summaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.h
diff options
context:
space:
mode:
authorGus Caplan <me@gus.host>2022-07-18 00:41:29 -0700
committerLiam <byteslice@airmail.cc>2022-12-12 21:18:32 -0500
commitf44c60321ec767b6e881160d4960345d678edf78 (patch)
tree2b916f8af6d326845feff5c8de8515a383e8ca68 /src/yuzu/bootmanager.h
parent339a37f8cb19dffbf64015b5d9a362a1ef5560c2 (diff)
let games gracefully exit
Diffstat (limited to 'src/yuzu/bootmanager.h')
-rw-r--r--src/yuzu/bootmanager.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index f4deae4ee..c2b127f19 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -11,6 +11,7 @@
#include <QImage>
#include <QStringList>
#include <QThread>
+#include <QTimer>
#include <QTouchEvent>
#include <QWidget>
@@ -87,6 +88,15 @@ public:
* Requests for the emulation thread to stop running
*/
void RequestStop() {
+ QTimer::singleShot(5000, this, &EmuThread::ForceStop);
+ }
+
+private slots:
+ void ForceStop() {
+ if (!IsRunning()) {
+ return;
+ }
+ LOG_WARNING(Frontend, "Force stopping EmuThread");
stop_source.request_stop();
SetRunning(false);
}