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 | 36950ef442fec354e3f8bbe683f6509f43cc34fe (patch) | |
| tree | f744a93874c713608617364205fe70605b6e63ec /src/yuzu/bootmanager.cpp | |
| parent | 657720ad642da04e1061d77e6b08beb98aa6435c (diff) | |
| parent | e9f112183ba5a986d294165776cae9e72026fb46 (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 1a47fb9c96..642f966908 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 |
