summaryrefslogtreecommitdiffhomepage
path: root/variant
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-10-27 11:22:29 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-10-27 10:53:21 +0000
commitbb93b3778541614ea0f4633fe283c333cbac1287 (patch)
tree3b101ef02b90969ac635fac4f33c76cb7503b475 /variant
parent99017c8c155818b55176aa8081fc8cc171009676 (diff)
trackmouse: avoid recursive exit
Diffstat (limited to 'variant')
-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);
}