mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 15:31:26 +12:00
Improve Restart function
Don't erase boot args Should now work correctly with game launchers
This commit is contained in:
parent
7050575fdb
commit
af3e1fc580
4 changed files with 14 additions and 7 deletions
|
@ -920,7 +920,7 @@ void Emulator::Resume()
|
|||
GetCallbacks().on_resume();
|
||||
}
|
||||
|
||||
void Emulator::Stop()
|
||||
void Emulator::Stop(bool restart)
|
||||
{
|
||||
if (m_state.exchange(system_state::stopped) == system_state::stopped)
|
||||
{
|
||||
|
@ -928,7 +928,7 @@ void Emulator::Stop()
|
|||
return;
|
||||
}
|
||||
|
||||
const bool do_exit = !m_force_boot && g_cfg.misc.autoexit;
|
||||
const bool do_exit = !restart && !m_force_boot && g_cfg.misc.autoexit;
|
||||
|
||||
LOG_NOTICE(GENERAL, "Stopping emulator...");
|
||||
|
||||
|
@ -992,6 +992,12 @@ void Emulator::Stop()
|
|||
jit_finalize();
|
||||
#endif
|
||||
|
||||
if (restart)
|
||||
{
|
||||
return Load();
|
||||
}
|
||||
|
||||
// Boot arg cleanup (preserved in the case restarting)
|
||||
argv.clear();
|
||||
envp.clear();
|
||||
data.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue