1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2025-01-31 20:41:45 +01:00

Minor changes related to Emu.Stop()

This commit is contained in:
Megamouse 2020-11-24 19:13:42 +01:00
parent d8e9382573
commit 9efedbe76a
3 changed files with 14 additions and 3 deletions

View File

@ -1957,9 +1957,12 @@ void Emulator::Stop(bool restart)
// Always Enable display sleep, not only if it was prevented.
enable_display_sleep();
if (!m_force_boot && Quit(g_cfg.misc.autoexit.get()))
if (!m_force_boot)
{
return;
if (Quit(g_cfg.misc.autoexit.get()))
{
return;
}
}
m_force_boot = false;

View File

@ -83,7 +83,12 @@ class Emulator final
u32 m_usrid{1};
bool m_force_global_config = false;
// This flag should be adjusted before each Stop() or each BootGame() and similar because:
// 1. It forces an application to boot immediately by calling Run() in Load().
// 2. It signifies that we don't want to exit on Stop(), for example if we want to transition to another application.
bool m_force_boot = false;
bool m_has_gui = true;
public:

View File

@ -2227,7 +2227,10 @@ void main_window::closeEvent(QCloseEvent* closeEvent)
}
// Cleanly stop and quit the emulator.
Emu.Stop();
if (!Emu.IsStopped())
{
Emu.Stop();
}
Emu.Quit(true);
}