From 64e5a8c0998b72a94776223e0b5031546d4b4b47 Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Mon, 20 Oct 2025 16:19:58 +0300 Subject: [PATCH] SaveState Manager: Add option to boot last savestate --- rpcs3/rpcs3qt/game_list_frame.cpp | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index ac9f58e329..313e043613 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -1223,21 +1223,30 @@ void game_list_frame::ShowContextMenu(const QPoint &pos) if (const std::string sstate = get_savestate_file(current_game.serial, current_game.path, 1); is_savestate_compatible(sstate)) { - QAction* boot_state = menu.addAction(is_current_running_game - ? tr("&Reboot with savestate") - : tr("&Boot with savestate")); - connect(boot_state, &QAction::triggered, [this, gameinfo, sstate, current_game] - { - if (!get_savestate_file(current_game.serial, current_game.path, 2).empty()) - { - // If there is any ambiguity, launch the savestate manager - Q_EMIT RequestSaveStateManager(gameinfo); - return; - } + const bool has_ambiguity = !get_savestate_file(current_game.serial, current_game.path, 2).empty(); + QAction* boot_state = menu.addAction(is_current_running_game + ? tr("&Reboot with last SaveState") + : tr("&Boot with last SaveState")); + + connect(boot_state, &QAction::triggered, [this, gameinfo, sstate] + { sys_log.notice("Booting savestate from gamelist per context menu..."); Q_EMIT RequestBoot(gameinfo, cfg_mode::custom, "", sstate); }); + + if (has_ambiguity) + { + QAction* choose_state = menu.addAction(is_current_running_game + ? tr("&Choose SaveState to reboot") + : tr("&Choose SaveState to boot")); + + connect(choose_state, &QAction::triggered, [this, gameinfo] + { + // If there is any ambiguity, launch the savestate manager + Q_EMIT RequestSaveStateManager(gameinfo); + }); + } } menu.addSeparator();