mirror of https://github.com/stella-emu/stella.git
Added rewind/unwind shortcuts from TimeMachine to debugger.
- disabled the old Ctrl-r/y shortcuts, but the code is still there for experimentation
This commit is contained in:
parent
de7fd7401b
commit
db9cd28346
|
@ -93,11 +93,39 @@ void DebuggerDialog::handleKeyDown(StellaKey key, StellaMod mod)
|
||||||
else if(key == KBDK_F12)
|
else if(key == KBDK_F12)
|
||||||
{
|
{
|
||||||
instance().debugger().parser().run("savesnap");
|
instance().debugger().parser().run("savesnap");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if(StellaModTest::isAlt(mod) && !StellaModTest::isControl(mod))
|
||||||
|
{
|
||||||
|
switch(key)
|
||||||
|
{
|
||||||
|
case KBDK_LEFT: // Alt-left(-shift) rewinds 1(10) states
|
||||||
|
if(StellaModTest::isShift(mod))
|
||||||
|
doRewind10();
|
||||||
|
else
|
||||||
|
doRewind();
|
||||||
|
return;
|
||||||
|
case KBDK_RIGHT: // Alt-right(-shift) unwinds 1(10) states
|
||||||
|
if(StellaModTest::isShift(mod))
|
||||||
|
doUnwind10();
|
||||||
|
else
|
||||||
|
doUnwind();
|
||||||
|
return;
|
||||||
|
case KBDK_DOWN: // Alt-down rewinds to start of list
|
||||||
|
doRewindAll();
|
||||||
|
return;
|
||||||
|
case KBDK_UP: // Alt-up rewinds to end of list
|
||||||
|
doUnwindAll();
|
||||||
|
return;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(StellaModTest::isControl(mod))
|
else if(StellaModTest::isControl(mod))
|
||||||
{
|
{
|
||||||
switch(key)
|
switch(key)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
case KBDK_R:
|
case KBDK_R:
|
||||||
if(StellaModTest::isAlt(mod))
|
if(StellaModTest::isAlt(mod))
|
||||||
doRewindAll();
|
doRewindAll();
|
||||||
|
@ -105,7 +133,7 @@ void DebuggerDialog::handleKeyDown(StellaKey key, StellaMod mod)
|
||||||
doRewind10();
|
doRewind10();
|
||||||
else
|
else
|
||||||
doRewind();
|
doRewind();
|
||||||
break;
|
return;
|
||||||
case KBDK_Y:
|
case KBDK_Y:
|
||||||
if(StellaModTest::isAlt(mod))
|
if(StellaModTest::isAlt(mod))
|
||||||
doUnwindAll();
|
doUnwindAll();
|
||||||
|
@ -113,19 +141,20 @@ void DebuggerDialog::handleKeyDown(StellaKey key, StellaMod mod)
|
||||||
doUnwind10();
|
doUnwind10();
|
||||||
else
|
else
|
||||||
doUnwind();
|
doUnwind();
|
||||||
break;
|
return;
|
||||||
|
#endif
|
||||||
case KBDK_S:
|
case KBDK_S:
|
||||||
doStep();
|
doStep();
|
||||||
break;
|
return;
|
||||||
case KBDK_T:
|
case KBDK_T:
|
||||||
doTrace();
|
doTrace();
|
||||||
break;
|
return;
|
||||||
case KBDK_L:
|
case KBDK_L:
|
||||||
doScanlineAdvance();
|
doScanlineAdvance();
|
||||||
break;
|
return;
|
||||||
case KBDK_F:
|
case KBDK_F:
|
||||||
doAdvance();
|
doAdvance();
|
||||||
break;
|
return;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue