let games gracefully exit

This commit is contained in:
Gus Caplan
2022-12-12 21:18:32 -05:00
committed by Liam
parent 339a37f8cb
commit f44c60321e
3 changed files with 17 additions and 3 deletions
+5
View File
@@ -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