From 6523afa69a74bb60b0ffd994dd962a101c4d3ae3 Mon Sep 17 00:00:00 2001 From: Darkhost1999 <60384196+Darkhost1999@users.noreply.github.com> Date: Mon, 16 Mar 2026 19:38:32 -0500 Subject: [PATCH] overlays/home: Fix restarting games from home menu --- .../HomeMenu/overlay_home_menu_main_menu.cpp | 2 +- rpcs3/Emu/System.cpp | 23 +++++++++++++++---- rpcs3/Loader/ISO.cpp | 2 +- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_main_menu.cpp b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_main_menu.cpp index d44418f651..9d239355c9 100644 --- a/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_main_menu.cpp +++ b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_main_menu.cpp @@ -135,7 +135,7 @@ namespace rsx { // Make sure we keep the game window opened Emu.SetContinuousMode(true); - Emu.Restart(false); + Emu.Restart(true); }); return page_navigation::exit; }); diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 85b753d130..42854504f7 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -959,11 +959,6 @@ game_boot_result Emulator::BootGame(const std::string& path, const std::string& return result; }; - if (m_path_original.empty() || config_mode != cfg_mode::continuous) - { - m_path_original = m_path; - } - m_path_old = m_path; m_config_mode = config_mode; @@ -974,6 +969,11 @@ game_boot_result Emulator::BootGame(const std::string& path, const std::string& { 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)); } @@ -984,6 +984,12 @@ game_boot_result Emulator::BootGame(const std::string& path, const std::string& { ensure(!elf.empty()); m_path = elf; + + if (config_mode != cfg_mode::continuous || m_path_original.empty()) + { + m_path_original = m_path; + } + result = Load(title_id); } @@ -4001,6 +4007,13 @@ game_boot_result Emulator::Restart(bool graceful) 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) m_restrict_emu_state_change = 0; diff --git a/rpcs3/Loader/ISO.cpp b/rpcs3/Loader/ISO.cpp index af2d18ff7d..a80d664174 100644 --- a/rpcs3/Loader/ISO.cpp +++ b/rpcs3/Loader/ISO.cpp @@ -611,7 +611,7 @@ void load_iso(const std::string& path) void unload_iso() { - sys_log.notice("Unoading iso"); + sys_log.notice("Unloading iso"); fs::set_virtual_device("iso_overlay_fs_dev", stx::shared_ptr()); }