From f44c60321ec767b6e881160d4960345d678edf78 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 18 Jul 2022 00:41:29 -0700 Subject: let games gracefully exit --- src/yuzu/bootmanager.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/yuzu/bootmanager.h') 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 #include #include +#include #include #include @@ -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); } -- cgit v1.2.3