Ease of use improvements to rewind support.

This commit is contained in:
byuu 2019-07-23 02:53:54 +09:00
parent 32e2abdd90
commit b4c4b318e8
1 changed files with 7 additions and 1 deletions

View File

@ -14,8 +14,14 @@ auto InputManager::bindHotkeys() -> void {
}));
hotkeys.append(InputHotkey("Rewind").onPress([&] {
program.rewindMode(Program::Rewind::Mode::Rewinding);
if(!emulator->loaded()) return;
if(program.rewind.frequency == 0) {
program.showMessage("Please enable rewind support in Settings->Emulator first");
} else {
program.rewindMode(Program::Rewind::Mode::Rewinding);
}
}).onRelease([&] {
if(!emulator->loaded()) return;
program.rewindMode(Program::Rewind::Mode::Playing);
}));