From ce195d71a1847bac2bdd08cf5c8fe2e1560be0da Mon Sep 17 00:00:00 2001 From: thrust26 Date: Sun, 7 Jan 2018 10:56:30 +0100 Subject: [PATCH] fixed #276 made sure that the rewind buttons always have correct state when entering debugger --- src/debugger/Debugger.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/debugger/Debugger.cxx b/src/debugger/Debugger.cxx index 28bc43409..95da6a018 100644 --- a/src/debugger/Debugger.cxx +++ b/src/debugger/Debugger.cxx @@ -619,9 +619,11 @@ void Debugger::setStartState() // Save initial state and add it to the rewind list (except when in currently rewinding) RewindManager& r = myOSystem.state().rewindManager(); - // avoid invalidating future states when entering the debugger during rewind - if (r.atLast()) + // avoid invalidating future states when entering the debugger e.g. during rewind + if(myOSystem.eventHandler().state() == EventHandlerState::EMULATION) addState("enter debugger"); + else + updateRewindbuttons(r); // Set the 're-disassemble' flag, but don't do it until the next scheduled time myDialog->rom().invalidate(false);