diff --git a/src/debugger/Debugger.cxx b/src/debugger/Debugger.cxx index 8915fbc6a..7456dd0e4 100644 --- a/src/debugger/Debugger.cxx +++ b/src/debugger/Debugger.cxx @@ -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(); diff --git a/src/debugger/gui/DebuggerDialog.cxx b/src/debugger/gui/DebuggerDialog.cxx index daf4eeb0f..890148933 100644 --- a/src/debugger/gui/DebuggerDialog.cxx +++ b/src/debugger/gui/DebuggerDialog.cxx @@ -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; diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 5c1cb6ce6..dde0e1056 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -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) {