System.cpp: Minor regression fix (#12874)

Do not move savestate if the actual boot is unsuccessful.
This commit is contained in:
Elad Ashkenazi 2022-10-23 18:07:44 +03:00 committed by GitHub
parent 9f3f619774
commit 1a9e38a1dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -668,7 +668,7 @@ game_boot_result Emulator::BootGame(const std::string& path, const std::string&
auto error = Load(title_id, add_only);
if (g_cfg.savestate.suspend_emu)
if (g_cfg.savestate.suspend_emu && error == game_boot_result::no_errors)
{
for (std::string old_path : std::initializer_list<std::string>{m_ar ? path : "", m_title_id.empty() ? "" : get_savestate_path(m_title_id, path)})
{