support using ESC to exit debugger
This commit is contained in:
Thomas Jentzsch 2019-08-14 14:52:28 +02:00
parent f908679b7c
commit 950068ba60
3 changed files with 3 additions and 7 deletions

View File

@ -154,7 +154,7 @@ bool Debugger::startWithFatalError(const string& message)
void Debugger::quit(bool exitrom)
{
if(exitrom)
myOSystem.eventHandler().handleEvent(Event::ExitMode, true);
myOSystem.eventHandler().handleEvent(Event::ExitMode);
else
{
myOSystem.eventHandler().leaveDebugMode();

View File

@ -81,7 +81,6 @@ void DebuggerDialog::loadConfig()
myFirstLoad = false;
}
myTab->loadConfig();
myTiaInfo->loadConfig();
myTiaOutput->loadConfig();
@ -548,6 +547,7 @@ void DebuggerDialog::addRomArea()
b = new ButtonWidget(this, *myLFont, buttonX, buttonY,
bwidth, bheight, "Exit", kDDExitCmd);
wid2.push_back(b);
addCancelWidget(b);
bwidth = bheight; // 7 + 12;
bheight = bheight * 3 + 4 * 2;

View File

@ -709,12 +709,8 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
if (pressed && !repeated) changeStateByEvent(Event::TimeMachineMode);
return;
#if 0 // FIXME - exits ROM too, when it should just go back to ROM
// this event is called when exiting a ROM from the debugger, so it acts like pressing ESC in emulation
case EventHandlerState::DEBUGGER:
if (pressed && !repeated) changeStateByEvent(Event::DebuggerMode);
return;
#endif
case EventHandlerState::EMULATION:
if (pressed && !repeated)
{