Only add states to the rewind/undo list with actions triggered by the user;

don't add one when the console is first created.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1861 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2009-08-25 14:33:11 +00:00
parent ddc77bd7e7
commit a13fad2d0f
2 changed files with 5 additions and 5 deletions

View File

@ -219,7 +219,7 @@ void Debugger::setConsole(Console* console)
// Make sure cart RAM is added before this is called,
// otherwise the debugger state won't know about it
saveOldState();
saveOldState(false); // don't add the state to the rewind list
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -753,7 +753,7 @@ bool Debugger::patchROM(int addr, int value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Debugger::saveOldState()
void Debugger::saveOldState(bool addrewind)
{
myCpuDebug->saveOldState();
myRamDebug->saveOldState();
@ -761,7 +761,7 @@ void Debugger::saveOldState()
myTiaDebug->saveOldState();
// Add another rewind level to the Undo list
if(myRewindManager) myRewindManager->addState();
if(addrewind) myRewindManager->addState();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -321,9 +321,9 @@ class Debugger : public DialogContainer
private:
/**
Save state of each debugger subsystem
Save state of each debugger subsystem.
*/
void saveOldState();
void saveOldState(bool addrewind = true);
/**
Set initial state before entering the debugger.