diff options
author | Gus Caplan <me@gus.host> | 2022-07-18 00:41:29 -0700 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-12-12 21:18:32 -0500 |
commit | f44c60321ec767b6e881160d4960345d678edf78 (patch) | |
tree | 2b916f8af6d326845feff5c8de8515a383e8ca68 /src/yuzu/bootmanager.cpp | |
parent | 339a37f8cb19dffbf64015b5d9a362a1ef5560c2 (diff) |
let games gracefully exit
Diffstat (limited to 'src/yuzu/bootmanager.cpp')
-rw-r--r-- | src/yuzu/bootmanager.cpp | 5 |
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 |