Fixes for setting rewind mode

This commit is contained in:
thrust26 2017-11-25 18:14:32 +01:00
parent 4b748681db
commit 5445dc6019
3 changed files with 11 additions and 1 deletions

View File

@ -355,7 +355,8 @@ bool StateManager::saveState(Serializer& out)
void StateManager::reset() void StateManager::reset()
{ {
myRewindManager->clear(); myRewindManager->clear();
myActiveMode = myOSystem.settings().getBool("dev.rewind") ? Mode::Rewind : Mode::Off; myActiveMode = myOSystem.settings().getBool(
myOSystem.settings().getBool("dev.settings") ? "dev.rewind" : "plr.rewind") ? Mode::Rewind : Mode::Off;
#if 0 #if 0
myCurrentSlot = 0; myCurrentSlot = 0;

View File

@ -65,6 +65,12 @@ class StateManager
*/ */
void toggleRewindMode(); void toggleRewindMode();
/**
Sets state rewind recording mode; this uses the RewindManager
for its functionality.
*/
void setRewindMode(Mode mode) { myActiveMode = mode; };
/** /**
Rewinds one state; this uses the RewindManager for its functionality. Rewinds one state; this uses the RewindManager for its functionality.
*/ */

View File

@ -36,6 +36,7 @@
#include "Console.hxx" #include "Console.hxx"
#include "TIA.hxx" #include "TIA.hxx"
#include "OSystem.hxx" #include "OSystem.hxx"
#include "StateManager.hxx"
#include "DeveloperDialog.hxx" #include "DeveloperDialog.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -546,6 +547,8 @@ void DeveloperDialog::saveConfig()
//instance().createFrameBuffer(); //instance().createFrameBuffer();
// TODO: update RewindManager // TODO: update RewindManager
instance().state().setRewindMode(myContinuousRewindWidget->getState() ?
StateManager::Mode::Rewind : StateManager::Mode::Off);
// define interval growth factor // define interval growth factor
uInt32 size = myStateSizeWidget->getValue(); uInt32 size = myStateSizeWidget->getValue();