summaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.cpp
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.cpp
parent339a37f8cb19dffbf64015b5d9a362a1ef5560c2 (diff)
let games gracefully exit
Diffstat (limited to 'src/yuzu/bootmanager.cpp')
-rw-r--r--src/yuzu/bootmanager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 5b5b6fed8..f7321258c 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -80,6 +80,11 @@ void EmuThread::run() {
system.GetCpuManager().OnGpuReady();
+ system.RegisterExitCallback([this]() {
+ stop_source.request_stop();
+ SetRunning(false);
+ });
+
// Holds whether the cpu was running during the last iteration,
// so that the DebugModeLeft signal can be emitted before the
// next execution step