summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--variant/trackmouse/window.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/variant/trackmouse/window.cpp b/variant/trackmouse/window.cpp
index d893b5c1..1cda0694 100644
--- a/variant/trackmouse/window.cpp
+++ b/variant/trackmouse/window.cpp
@@ -327,8 +327,16 @@ void main_window::set_title(const QString& game_title)
void main_window::exit(int status)
{
+ if (exiting_already)
+ return;
+ exiting_already = true;
+
+ qDebug() << "trackmouse: saving settings on app exit";
+ save_settings_timer.stop();
+ mouse.b->save();
+
+ //close();
QApplication::setQuitOnLastWindowClosed(true);
- close();
QApplication::exit(status);
}