diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index d38fa06c7a..b9f1ea96e1 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -1731,9 +1731,6 @@ void Emulator::Stop(bool restart) } }); - const bool full_stop = !restart && !m_force_boot; - const bool do_exit = full_stop && g_cfg.misc.autoexit; - sys_log.notice("Stopping emulator..."); GetCallbacks().on_stop(); @@ -1772,25 +1769,21 @@ void Emulator::Stop(bool restart) klic.clear(); hdd1.clear(); - m_force_boot = false; - // Always Enable display sleep, not only if it was prevented. enable_display_sleep(); - if (do_exit || full_stop) + if (Quit(g_cfg.misc.autoexit.get())) { - if (Quit(do_exit)) - { - return; - } + return; } + m_force_boot = false; Init(); } -bool Emulator::Quit(bool force_quit) const +bool Emulator::Quit(bool force_quit) { - Emu.SetForceBoot(false); + m_force_boot = false; Emu.Stop(); return GetCallbacks().exit(force_quit); diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index ec2b6aaed0..122b960e98 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -202,7 +202,7 @@ public: void Resume(); void Stop(bool restart = false); void Restart() { Stop(true); } - bool Quit(bool force_quit) const; + bool Quit(bool force_quit); bool IsRunning() const { return m_state == system_state::running; } bool IsPaused() const { return m_state == system_state::paused; }