mirror of https://github.com/stella-emu/stella.git
ESC key exits Debugger too
many keys are enabled now during PAUSE mode too
This commit is contained in:
parent
d7bcde29dc
commit
7d9b7388c9
|
@ -329,7 +329,7 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// These only work when in emulation mode
|
// These only work when in emulation mode
|
||||||
if(!handled && myState == EventHandlerState::EMULATION)
|
if(!handled && (myState == EventHandlerState::EMULATION || myState == EventHandlerState::PAUSE))
|
||||||
{
|
{
|
||||||
handled = true;
|
handled = true;
|
||||||
switch(key)
|
switch(key)
|
||||||
|
@ -539,7 +539,7 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
|
||||||
handleEvent(Event::Quit, 1);
|
handleEvent(Event::Quit, 1);
|
||||||
}
|
}
|
||||||
// These only work when in emulation mode
|
// These only work when in emulation mode
|
||||||
else if(myState == EventHandlerState::EMULATION)
|
else if(myState == EventHandlerState::EMULATION || myState == EventHandlerState::PAUSE)
|
||||||
{
|
{
|
||||||
switch(key)
|
switch(key)
|
||||||
{
|
{
|
||||||
|
@ -631,13 +631,11 @@ void EventHandler::handleKeyEvent(StellaKey key, StellaMod mod, bool state)
|
||||||
leaveMenuMode();
|
leaveMenuMode();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: this currently does not work, because it exits the search dialog too
|
else if(myState == EventHandlerState::DEBUGGER && myOSystem.debugger().canExit())
|
||||||
// How can we identify if the focus is in a different dialog?
|
|
||||||
/*else if(myState == EventHandlerState::DEBUGGER && !myOSystem.debugger().inMenuMode())
|
|
||||||
{
|
{
|
||||||
leaveDebugMode();
|
leaveDebugMode();
|
||||||
return;
|
return;
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle keys which switch eventhandler state
|
// Handle keys which switch eventhandler state
|
||||||
|
@ -1248,14 +1246,14 @@ bool EventHandler::eventStateChange(Event::Type type)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Event::OptionsMenuMode:
|
case Event::OptionsMenuMode:
|
||||||
if(myState == EventHandlerState::EMULATION)
|
if(myState == EventHandlerState::EMULATION || myState == EventHandlerState::PAUSE)
|
||||||
enterMenuMode(EventHandlerState::OPTIONSMENU);
|
enterMenuMode(EventHandlerState::OPTIONSMENU);
|
||||||
else
|
else
|
||||||
handled = false;
|
handled = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Event::CmdMenuMode:
|
case Event::CmdMenuMode:
|
||||||
if(myState == EventHandlerState::EMULATION)
|
if(myState == EventHandlerState::EMULATION || myState == EventHandlerState::PAUSE)
|
||||||
enterMenuMode(EventHandlerState::CMDMENU);
|
enterMenuMode(EventHandlerState::CMDMENU);
|
||||||
else if(myState == EventHandlerState::CMDMENU)
|
else if(myState == EventHandlerState::CMDMENU)
|
||||||
leaveMenuMode();
|
leaveMenuMode();
|
||||||
|
@ -1264,7 +1262,7 @@ bool EventHandler::eventStateChange(Event::Type type)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Event::TimeMachineMode:
|
case Event::TimeMachineMode:
|
||||||
if(myState == EventHandlerState::EMULATION)
|
if(myState == EventHandlerState::EMULATION || myState == EventHandlerState::PAUSE)
|
||||||
enterMenuMode(EventHandlerState::TIMEMACHINE);
|
enterMenuMode(EventHandlerState::TIMEMACHINE);
|
||||||
else if(myState == EventHandlerState::TIMEMACHINE)
|
else if(myState == EventHandlerState::TIMEMACHINE)
|
||||||
leaveMenuMode();
|
leaveMenuMode();
|
||||||
|
|
Loading…
Reference in New Issue