From 682c42a74150c1d345fa5d7dd3ed4a8136f8071d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 22 Oct 2017 10:18:41 +0200 Subject: gui/main-window: give ps3 eye time to stop properly --- gui/main-window.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gui') 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 #include @@ -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() -- cgit v1.2.3