diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 4554e1aeb..cf26a716c 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -1518,7 +1518,9 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated) return; case Event::ReloadConsole: - if(pressed && !repeated) myOSystem.reloadConsole(true); + if(pressed && !repeated && !myOSystem.reloadConsole(true)) + setState(EventHandlerState::LAUNCHER); + return; case Event::PreviousMultiCartRom: diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index e7f06314c..b669d2300 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -967,6 +967,7 @@ void OSystem::mainLoop() const bool wasEmulation = myEventHandler->state() == EventHandlerState::EMULATION; myEventHandler->poll(TimerManager::getTicks()); + if(myQuitLoop) break; // Exit if the user wants to quit if (!wasEmulation && myEventHandler->state() == EventHandlerState::EMULATION) {