@@ -1223,21 +1223,30 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
12231223
12241224 if (const std::string sstate = get_savestate_file (current_game.serial , current_game.path , 1 ); is_savestate_compatible (sstate))
12251225 {
1226+ const bool has_ambiguity = !get_savestate_file (current_game.serial , current_game.path , 2 ).empty ();
1227+
12261228 QAction* boot_state = menu.addAction (is_current_running_game
1227- ? tr (" &Reboot with savestate" )
1228- : tr (" &Boot with savestate" ));
1229- connect (boot_state, &QAction::triggered, [this , gameinfo, sstate, current_game]
1230- {
1231- if (!get_savestate_file (current_game.serial , current_game.path , 2 ).empty ())
1232- {
1233- // If there is any ambiguity, launch the savestate manager
1234- Q_EMIT RequestSaveStateManager (gameinfo);
1235- return ;
1236- }
1229+ ? tr (" &Reboot with last SaveState" )
1230+ : tr (" &Boot with last SaveState" ));
12371231
1232+ connect (boot_state, &QAction::triggered, [this , gameinfo, sstate]
1233+ {
12381234 sys_log.notice (" Booting savestate from gamelist per context menu..." );
12391235 Q_EMIT RequestBoot (gameinfo, cfg_mode::custom, " " , sstate);
12401236 });
1237+
1238+ if (has_ambiguity)
1239+ {
1240+ QAction* choose_state = menu.addAction (is_current_running_game
1241+ ? tr (" &Choose SaveState to reboot" )
1242+ : tr (" &Choose SaveState to boot" ));
1243+
1244+ connect (choose_state, &QAction::triggered, [this , gameinfo]
1245+ {
1246+ // If there is any ambiguity, launch the savestate manager
1247+ Q_EMIT RequestSaveStateManager (gameinfo);
1248+ });
1249+ }
12411250 }
12421251
12431252 menu.addSeparator ();
0 commit comments