Fix "Exit RPCS3 when process finishes" command line crash

Added force_boot to force boot on cmdline boot.
Load() caused a Stop() that exited the application with "Exit RPCS3 when process finishes" enabled. Now Stop is only called if the emu is not stopped
This commit is contained in:
Unknown 2017-11-01 12:55:46 +01:00 committed by Ivan
parent dd5791a2cc
commit de465cb941
3 changed files with 16 additions and 3 deletions

View file

@ -281,9 +281,17 @@ std::string Emulator::GetLibDir()
return fmt::replace_all(g_cfg.vfs.dev_flash, "$(EmulatorDir)", emu_dir) + "sys/external/";
}
void Emulator::SetForceBoot(bool force_boot)
{
m_force_boot = force_boot;
}
void Emulator::Load(bool add_only)
{
Stop();
if (!IsStopped())
{
Stop();
}
try
{
@ -616,9 +624,10 @@ void Emulator::Load(bool add_only)
return;
}
if (g_cfg.misc.autostart && IsReady())
if ((m_force_boot || g_cfg.misc.autostart) && IsReady())
{
Run();
m_force_boot = false;
}
else if (IsPaused())
{