Fix exitspawn (autoexit option)

Fix other situations affected by this options
This commit is contained in:
Nekotekina 2017-11-24 11:00:47 +03:00
parent 2ac773385f
commit f7803927d9
6 changed files with 21 additions and 10 deletions

View file

@ -787,9 +787,12 @@ void Emulator::Stop()
{
if (m_state.exchange(system_state::stopped) == system_state::stopped)
{
m_force_boot = false;
return;
}
const bool do_exit = !m_force_boot && g_cfg.misc.autoexit;
LOG_NOTICE(GENERAL, "Stopping emulator...");
GetCallbacks().on_stop();
@ -838,7 +841,7 @@ void Emulator::Stop()
RSXIOMem.Clear();
vm::close();
if (g_cfg.misc.autoexit)
if (do_exit)
{
GetCallbacks().exit();
}
@ -857,6 +860,8 @@ void Emulator::Stop()
data.clear();
disc.clear();
klic.clear();
m_force_boot = false;
}
s32 error_code::error_report(const fmt_type_info* sup, u64 arg, const fmt_type_info* sup2, u64 arg2)