overlays/home: Fix restarting games from home menu

This commit is contained in:
Darkhost1999
2026-03-16 19:38:32 -05:00
committed by Megamouse
parent 5416f432b5
commit 6523afa69a
3 changed files with 20 additions and 7 deletions
@@ -135,7 +135,7 @@ namespace rsx
{ {
// Make sure we keep the game window opened // Make sure we keep the game window opened
Emu.SetContinuousMode(true); Emu.SetContinuousMode(true);
Emu.Restart(false); Emu.Restart(true);
}); });
return page_navigation::exit; return page_navigation::exit;
}); });
+18 -5
View File
@@ -959,11 +959,6 @@ game_boot_result Emulator::BootGame(const std::string& path, const std::string&
return result; return result;
}; };
if (m_path_original.empty() || config_mode != cfg_mode::continuous)
{
m_path_original = m_path;
}
m_path_old = m_path; m_path_old = m_path;
m_config_mode = config_mode; m_config_mode = config_mode;
@@ -974,6 +969,11 @@ game_boot_result Emulator::BootGame(const std::string& path, const std::string&
{ {
m_path = path; m_path = path;
if (config_mode != cfg_mode::continuous || m_path_original.empty())
{
m_path_original = m_path;
}
return restore_on_no_boot(Load(title_id)); return restore_on_no_boot(Load(title_id));
} }
@@ -984,6 +984,12 @@ game_boot_result Emulator::BootGame(const std::string& path, const std::string&
{ {
ensure(!elf.empty()); ensure(!elf.empty());
m_path = elf; m_path = elf;
if (config_mode != cfg_mode::continuous || m_path_original.empty())
{
m_path_original = m_path;
}
result = Load(title_id); result = Load(title_id);
} }
@@ -4001,6 +4007,13 @@ game_boot_result Emulator::Restart(bool graceful)
m_path = m_path_real; m_path = m_path_real;
} }
// If continuous mode changed the path, restart from the original executable
if (!m_path_original.empty() && m_path_original != m_path)
{
sys_log.notice("Restart: Resetting boot path from '%s' to original '%s'", m_path, m_path_original);
m_path = m_path_original;
}
// Allow Boot (guarded by GracefulShutdown, which is the scope of this callback) // Allow Boot (guarded by GracefulShutdown, which is the scope of this callback)
m_restrict_emu_state_change = 0; m_restrict_emu_state_change = 0;
+1 -1
View File
@@ -611,7 +611,7 @@ void load_iso(const std::string& path)
void unload_iso() void unload_iso()
{ {
sys_log.notice("Unoading iso"); sys_log.notice("Unloading iso");
fs::set_virtual_device("iso_overlay_fs_dev", stx::shared_ptr<iso_device>()); fs::set_virtual_device("iso_overlay_fs_dev", stx::shared_ptr<iso_device>());
} }