Savestates: Implement Ctrl+R to reload the most recent savestate

Ctrl+R no longer means Resume emulation, this functionality has been transferred to Ctrl+P which is also capable of pausing the emulation. (so it's now a toggle)
This commit is contained in:
Eladash 2022-07-11 17:08:34 +03:00 committed by Ivan
parent 1f5cf776b2
commit 0bfdfd8433
8 changed files with 247 additions and 129 deletions

View file

@ -971,7 +971,9 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
});
}
if (const std::string sstate = fs::get_cache_dir() + "/savestates/" + current_game.serial + ".SAVESTAT"; fs::is_file(sstate))
extern bool is_savestate_compatible(const fs::file& file);
if (const std::string sstate = fs::get_cache_dir() + "/savestates/" + current_game.serial + ".SAVESTAT"; is_savestate_compatible(fs::file(sstate)))
{
QAction* boot_state = menu.addAction(is_current_running_game
? tr("&Reboot with savestate")