diff --git a/src/common/PaletteHandler.cxx b/src/common/PaletteHandler.cxx index 841c6adbf..e17b7f9e8 100644 --- a/src/common/PaletteHandler.cxx +++ b/src/common/PaletteHandler.cxx @@ -190,6 +190,7 @@ void PaletteHandler::changeCurrentAdjustable(int direction) showAdjustableMessage(); setPalette(); } + saveConfig(myOSystem.settings()); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index 8741aa31d..4d201aba1 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -1184,6 +1184,8 @@ void Console::toggleJitter(bool toggle) const bool enabled = myTIA->toggleJitter(toggle ? 2 : 3); const string message = string("TV scanline jitter ") + (enabled ? "enabled" : "disabled"); + myOSystem.settings().setValue( + myOSystem.settings().getBool("dev.settings") ? "dev.tv.jitter" : "plr.tv.jitter", enabled); myOSystem.frameBuffer().showTextMessage(message); } diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 593bedaa0..01c85a285 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -549,8 +549,8 @@ AdjustFunction EventHandler::getAdjustSetting(AdjustSetting setting) std::bind(&FrameBuffer::toggleAdaptRefresh, &myOSystem.frameBuffer(), _1), #endif std::bind(&FrameBuffer::changeOverscan, &myOSystem.frameBuffer(), _1), - std::bind(&Console::selectFormat, &myOSystem.console(), _1), - std::bind(&Console::changeVerticalCenter, &myOSystem.console(), _1), + std::bind(&Console::selectFormat, &myOSystem.console(), _1), // property, not persisted + std::bind(&Console::changeVerticalCenter, &myOSystem.console(), _1), // property, not persisted std::bind(&Console::toggleCorrectAspectRatio, &myOSystem.console(), _1), std::bind(&Console::changeVSizeAdjust, &myOSystem.console(), _1), // Palette adjustables @@ -614,37 +614,37 @@ AdjustFunction EventHandler::getAdjustSetting(AdjustSetting setting) std::bind(&EventHandler::changeMouseCursor, this, _1), std::bind(&FrameBuffer::toggleGrabMouse, &myOSystem.frameBuffer(), _1), // Game properties/Controllers - std::bind(&Console::changeLeftController, &myOSystem.console(), _1), - std::bind(&Console::changeRightController, &myOSystem.console(), _1), - std::bind(&Console::toggleSwapPorts, &myOSystem.console(), _1), - std::bind(&Console::toggleSwapPaddles, &myOSystem.console(), _1), - std::bind(&Console::changePaddleCenterX, &myOSystem.console(), _1), - std::bind(&Console::changePaddleCenterY, &myOSystem.console(), _1), - std::bind(&EventHandler::changeMouseControl, this, _1), - std::bind(&Console::changePaddleAxesRange, &myOSystem.console(), _1), + std::bind(&Console::changeLeftController, &myOSystem.console(), _1), // property, not persisted + std::bind(&Console::changeRightController, &myOSystem.console(), _1), // property, not persisted + std::bind(&Console::toggleSwapPorts, &myOSystem.console(), _1), // property, not persisted + std::bind(&Console::toggleSwapPaddles, &myOSystem.console(), _1), // property, not persisted + std::bind(&Console::changePaddleCenterX, &myOSystem.console(), _1), // property, not persisted + std::bind(&Console::changePaddleCenterY, &myOSystem.console(), _1), // property, not persisted + std::bind(&EventHandler::changeMouseControl, this, _1), // property, not persisted + std::bind(&Console::changePaddleAxesRange, &myOSystem.console(), _1), // property, not persisted // *** Debug settings *** std::bind(&FrameBuffer::toggleFrameStats, &myOSystem.frameBuffer(), _1), - std::bind(&Console::toggleP0Bit, &myOSystem.console(), _1), - std::bind(&Console::toggleP1Bit, &myOSystem.console(), _1), - std::bind(&Console::toggleM0Bit, &myOSystem.console(), _1), - std::bind(&Console::toggleM1Bit, &myOSystem.console(), _1), - std::bind(&Console::toggleBLBit, &myOSystem.console(), _1), - std::bind(&Console::togglePFBit, &myOSystem.console(), _1), - std::bind(&Console::toggleBits, &myOSystem.console(), _1), - std::bind(&Console::toggleP0Collision, &myOSystem.console(), _1), - std::bind(&Console::toggleP1Collision, &myOSystem.console(), _1), - std::bind(&Console::toggleM0Collision, &myOSystem.console(), _1), - std::bind(&Console::toggleM1Collision, &myOSystem.console(), _1), - std::bind(&Console::toggleBLCollision, &myOSystem.console(), _1), - std::bind(&Console::togglePFCollision, &myOSystem.console(), _1), - std::bind(&Console::toggleCollisions, &myOSystem.console(), _1), - std::bind(&Console::toggleFixedColors, &myOSystem.console(), _1), + std::bind(&Console::toggleP0Bit, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::toggleP1Bit, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::toggleM0Bit, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::toggleM1Bit, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::toggleBLBit, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::togglePFBit, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::toggleBits, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::toggleP0Collision, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::toggleP1Collision, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::toggleM0Collision, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::toggleM1Collision, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::toggleBLCollision, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::togglePFCollision, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::toggleCollisions, &myOSystem.console(), _1), // debug, not persisted + std::bind(&Console::toggleFixedColors, &myOSystem.console(), _1), // debug, not persisted std::bind(&Console::toggleColorLoss, &myOSystem.console(), _1), std::bind(&Console::toggleJitter, &myOSystem.console(), _1), // *** Following functions are not used when cycling settings but for "direct only" hotkeys *** - std::bind(&StateManager::changeState, &myOSystem.state(), _1), + std::bind(&StateManager::changeState, &myOSystem.state(), _1), // temporary, not persisted std::bind(&PaletteHandler::changeCurrentAdjustable, &myOSystem.frameBuffer().tiaSurface().paletteHandler(), _1), std::bind(&TIASurface::changeCurrentNTSCAdjustable, &myOSystem.frameBuffer().tiaSurface(), _1), std::bind(&Console::changeSpeed, &myOSystem.console(), _1), diff --git a/src/emucore/TIASurface.cxx b/src/emucore/TIASurface.cxx index 4b2ba4952..65ab16997 100644 --- a/src/emucore/TIASurface.cxx +++ b/src/emucore/TIASurface.cxx @@ -243,6 +243,7 @@ void TIASurface::changeNTSCAdjustable(int adjustable, int direction) setNTSC(NTSCFilter::Preset::CUSTOM); ntsc().changeAdjustable(adjustable, direction, text, valueText, newValue); + ntsc().saveConfig(myOSystem.settings()); myOSystem.frameBuffer().showGaugeMessage(text, valueText, newValue); } @@ -254,6 +255,7 @@ void TIASurface::changeCurrentNTSCAdjustable(int direction) setNTSC(NTSCFilter::Preset::CUSTOM); ntsc().changeCurrentAdjustable(direction, text, valueText, newValue); + ntsc().saveConfig(myOSystem.settings()); myOSystem.frameBuffer().showGaugeMessage(text, valueText, newValue); }