diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-12-16 11:57:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-16 11:57:33 -0500 |
commit | 6bc1a477bfba9f1ac60b864ddbccbfd61faa5f4c (patch) | |
tree | f744a93874c713608617364205fe70605b6e63ec /src/yuzu/bootmanager.cpp | |
parent | 9bfd4d880ecc332b230c9977654849d7521c93fb (diff) | |
parent | 179adee396e6b8480d52be5314979830beebfbc1 (diff) |
Merge pull request #8605 from devsnek/graceful-shutdown
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 1a47fb9c9..642f96690 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -79,6 +79,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 |