Save console controllers and switches state in state files. This allows

the debugger to work correctly when rewinding and interacting with these
parts of the system.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2355 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2012-01-14 17:12:25 +00:00
parent cb7f68bd02
commit a7ca813174
1 changed files with 6 additions and 4 deletions

View File

@ -231,8 +231,9 @@ bool Console::save(Serializer& out) const
if(!mySystem->save(out)) if(!mySystem->save(out))
return false; return false;
// Now save the console switches // Now save the console controllers and switches
if(!mySwitches->save(out)) if(!(myControllers[0]->save(out) && myControllers[1]->save(out) &&
mySwitches->save(out)))
return false; return false;
} }
catch(const char* msg) catch(const char* msg)
@ -253,8 +254,9 @@ bool Console::load(Serializer& in)
if(!mySystem->load(in)) if(!mySystem->load(in))
return false; return false;
// Then load the console switches // Then load the console controllers and switches
if(!mySwitches->load(in)) if(!(myControllers[0]->load(in) && myControllers[1]->load(in) &&
mySwitches->load(in)))
return false; return false;
} }
catch(const char* msg) catch(const char* msg)