savestateifs with identical conditions toggle each other (like breakif and trapif)

This commit is contained in:
thrust26 2017-11-20 16:18:20 +01:00
parent c996460bbe
commit da69311de5
1 changed files with 9 additions and 0 deletions

View File

@ -1605,6 +1605,15 @@ void DebuggerParser::executeSavestateif()
int res = YaccParser::parse(argStrings[0].c_str());
if(res == 0)
{
string condition = argStrings[0];
for(uInt32 i = 0; i < debugger.m6502().getCondSaveStateNames().size(); i++)
{
if(condition == debugger.m6502().getCondSaveStateNames()[i])
{
executeDelsavestateif();
return;
}
}
uInt32 ret = debugger.m6502().addCondSaveState(
YaccParser::getResult(), argStrings[0]);
commandResult << "added savestateif " << Base::toString(ret);