mirror of https://github.com/stella-emu/stella.git
fix repeated ESC from debugger
This commit is contained in:
parent
7d9b7388c9
commit
1b5ac9d3b5
|
@ -618,18 +618,21 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
|
||||||
if(!(StellaModTest::isControl(mod) || StellaModTest::isShift(mod) || StellaModTest::isAlt(mod)))
|
if(!(StellaModTest::isControl(mod) || StellaModTest::isShift(mod) || StellaModTest::isAlt(mod)))
|
||||||
{
|
{
|
||||||
// special handling for Escape key
|
// special handling for Escape key
|
||||||
if(state && key == KBDK_ESCAPE)
|
if(KBDK_ESCAPE)
|
||||||
{
|
{
|
||||||
if(myState == EventHandlerState::PAUSE)
|
if(state)
|
||||||
{
|
{
|
||||||
setEventState(EventHandlerState::EMULATION);
|
if(myState == EventHandlerState::PAUSE)
|
||||||
return;
|
{
|
||||||
}
|
setEventState(EventHandlerState::EMULATION);
|
||||||
else if(myState == EventHandlerState::CMDMENU ||
|
return;
|
||||||
myState == EventHandlerState::TIMEMACHINE)
|
}
|
||||||
{
|
else if(myState == EventHandlerState::CMDMENU ||
|
||||||
leaveMenuMode();
|
myState == EventHandlerState::TIMEMACHINE)
|
||||||
return;
|
{
|
||||||
|
leaveMenuMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(myState == EventHandlerState::DEBUGGER && myOSystem.debugger().canExit())
|
else if(myState == EventHandlerState::DEBUGGER && myOSystem.debugger().canExit())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue