From a7ca81317471c3c1618b345c2240670078499cb5 Mon Sep 17 00:00:00 2001 From: stephena Date: Sat, 14 Jan 2012 17:12:25 +0000 Subject: [PATCH] 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 --- src/emucore/Console.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index f6c7b88e8..57931b3f1 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -231,8 +231,9 @@ bool Console::save(Serializer& out) const if(!mySystem->save(out)) return false; - // Now save the console switches - if(!mySwitches->save(out)) + // Now save the console controllers and switches + if(!(myControllers[0]->save(out) && myControllers[1]->save(out) && + mySwitches->save(out))) return false; } catch(const char* msg) @@ -253,8 +254,9 @@ bool Console::load(Serializer& in) if(!mySystem->load(in)) return false; - // Then load the console switches - if(!mySwitches->load(in)) + // Then load the console controllers and switches + if(!(myControllers[0]->load(in) && myControllers[1]->load(in) && + mySwitches->load(in))) return false; } catch(const char* msg)