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 From 179adee396e6b8480d52be5314979830beebfbc1 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 12 Dec 2022 21:38:20 -0500 Subject: emu_thread: properly force shutdown for unresponsive guest programs --- src/yuzu/bootmanager.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/yuzu/bootmanager.h') diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h index c2b127f19..f0edad6e4 100644 --- a/src/yuzu/bootmanager.h +++ b/src/yuzu/bootmanager.h @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -85,17 +84,9 @@ public: } /** - * Requests for the emulation thread to stop running + * Requests for the emulation thread to immediately 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