From 5076da8f77d2091ed041b77246ecdc52e619a80e Mon Sep 17 00:00:00 2001 From: Megamouse Date: Fri, 28 Aug 2020 23:00:37 +0200 Subject: [PATCH] Fix auto exit - Don't quit on stop if force boot was set - Don't stop the emulator on gs_frame close when it was already stopped. This would remove the force boot flag by mistake. --- rpcs3/Emu/System.cpp | 2 +- rpcs3/rpcs3qt/gs_frame.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 0c5c403f7c..0d7578a867 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -1957,7 +1957,7 @@ void Emulator::Stop(bool restart) // Always Enable display sleep, not only if it was prevented. enable_display_sleep(); - if (Quit(g_cfg.misc.autoexit.get())) + if (!m_force_boot && Quit(g_cfg.misc.autoexit.get())) { return; } diff --git a/rpcs3/rpcs3qt/gs_frame.cpp b/rpcs3/rpcs3qt/gs_frame.cpp index 4f85127ed5..420c9bca00 100644 --- a/rpcs3/rpcs3qt/gs_frame.cpp +++ b/rpcs3/rpcs3qt/gs_frame.cpp @@ -285,7 +285,11 @@ bool gs_frame::get_mouse_lock_state() void gs_frame::close() { - Emu.Stop(); + if (!Emu.IsStopped()) + { + Emu.Stop(); + } + Emu.CallAfter([this]() { deleteLater(); }); }