Improve handling of errors during console reload.

This commit is contained in:
Christian Speckner 2024-08-22 13:10:12 +02:00
parent 7644ba6fa8
commit 14d2b50edd
2 changed files with 5 additions and 3 deletions

View File

@ -1519,12 +1519,14 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
case Event::ReloadConsole:
if(pressed && !repeated && !myOSystem.reloadConsole(true))
setState(EventHandlerState::LAUNCHER);
exitEmulation(true);
return;
case Event::PreviousMultiCartRom:
if(pressed && !repeated) myOSystem.reloadConsole(false);
if(pressed && !repeated&& !myOSystem.reloadConsole(true))
exitEmulation(true);
return;
case Event::ToggleTimeMachine:

View File

@ -224,7 +224,7 @@ void CommandDialog::handleCommand(CommandSender* sender, int cmd,
}
case kReloadRomCmd:
instance().eventHandler().leaveMenuMode();
instance().reloadConsole();
instance().eventHandler().handleEvent(Event::ReloadConsole);
break;
default: