summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-22 10:18:41 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-10-27 16:42:56 +0200
commit682c42a74150c1d345fa5d7dd3ed4a8136f8071d (patch)
treed2def77c1a9eb09572aad4fa007544c3d9f773ef
parent829bd3b164b90a68b0d73eac4a1bfa78aa520ba0 (diff)
gui/main-window: give ps3 eye time to stop properly
-rw-r--r--gui/main-window.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp
index 64935157..0382edf2 100644
--- a/gui/main-window.cpp
+++ b/gui/main-window.cpp
@@ -13,6 +13,7 @@
#include "new_file_dialog.h"
#include "migration/migration.hpp"
#include "compat/check-visible.hpp"
+#include "compat/sleep.hpp"
#include <QFile>
#include <QFileDialog>
@@ -311,7 +312,17 @@ MainWindow::~MainWindow()
{
if (tray)
tray->hide();
+ const bool just_stopping = bool(work);
stop_tracker_();
+
+ // stupid ps3 eye has LED issues
+ if (just_stopping)
+ {
+ close();
+ QEventLoop ev;
+ ev.processEvents();
+ portable::sleep(2000);
+ }
}
void MainWindow::set_working_directory()