mirror of https://github.com/stella-emu/stella.git
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:
parent
ddc77bd7e7
commit
a13fad2d0f
|
@ -219,7 +219,7 @@ void Debugger::setConsole(Console* console)
|
||||||
|
|
||||||
// Make sure cart RAM is added before this is called,
|
// Make sure cart RAM is added before this is called,
|
||||||
// otherwise the debugger state won't know about it
|
// 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();
|
myCpuDebug->saveOldState();
|
||||||
myRamDebug->saveOldState();
|
myRamDebug->saveOldState();
|
||||||
|
@ -761,7 +761,7 @@ void Debugger::saveOldState()
|
||||||
myTiaDebug->saveOldState();
|
myTiaDebug->saveOldState();
|
||||||
|
|
||||||
// Add another rewind level to the Undo list
|
// Add another rewind level to the Undo list
|
||||||
if(myRewindManager) myRewindManager->addState();
|
if(addrewind) myRewindManager->addState();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -321,9 +321,9 @@ class Debugger : public DialogContainer
|
||||||
|
|
||||||
private:
|
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.
|
Set initial state before entering the debugger.
|
||||||
|
|
Loading…
Reference in New Issue