aboutsummaryrefslogtreecommitdiff
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
commit786ec95e5d162e1568b0c3eaf532e873b3e0715e (patch)
tree2b916f8af6d326845feff5c8de8515a383e8ca68 /src/yuzu/bootmanager.cpp
parenta0fa54b0169854bd39f014899361a563e70c589d (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 5b5b6fed86..f7321258c2 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