Time machine rewinds are now triggered at the same time as entering the dialog.

This commit is contained in:
Stephen Anthony 2018-02-04 11:14:59 -03:30
parent 947125eea7
commit 9e53641add
1 changed files with 6 additions and 4 deletions

View File

@ -301,19 +301,19 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
{
case KBDK_LEFT: // Alt-left(-shift) rewinds 1(10) states
enterTimeMachineMenuMode((StellaModTest::isShift(mod) && state) ? 10 : 1, false);
break;
return;
case KBDK_RIGHT: // Alt-right(-shift) unwinds 1(10) states
enterTimeMachineMenuMode((StellaModTest::isShift(mod) && state) ? 10 : 1, true);
break;
return;
case KBDK_DOWN: // Alt-down rewinds to start of list
enterTimeMachineMenuMode(1000, false);
break;
return;
case KBDK_UP: // Alt-up rewinds to end of list
enterTimeMachineMenuMode(1000, true);
break;
return;
default:
handled = false;
@ -2138,6 +2138,8 @@ void EventHandler::enterTimeMachineMenuMode(uInt32 numWinds, bool unwind)
// add one extra state if we are in Time Machine mode
// TODO: maybe remove this state if we leave the menu at this new state
myOSystem.state().addExtraState("enter Time Machine dialog"); // force new state
if(numWinds)
myOSystem.state().windStates(numWinds, unwind);
// TODO: display last wind message (numWinds != 0) in time machine dialog
enterMenuMode(EventHandlerState::TIMEMACHINE);