From ae96406fd4aee419f5e06d46c68df3a2282b971a Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Thu, 9 Aug 2018 10:54:26 -0230 Subject: [PATCH] Fix #345; color-loss not correctly initialized. --- src/common/RewindManager.cxx | 2 +- src/emucore/CartBUS.cxx | 2 +- src/emucore/CartCDF.cxx | 2 +- src/emucore/CartDPCPlus.cxx | 2 +- src/emucore/tia/TIA.cxx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/RewindManager.cxx b/src/common/RewindManager.cxx index 55ff40959..14fe54c81 100644 --- a/src/common/RewindManager.cxx +++ b/src/common/RewindManager.cxx @@ -38,7 +38,7 @@ void RewindManager::setup() { myLastTimeMachineAdd = false; - string prefix = myOSystem.settings().getBool("dev.settings") ? "dev." : "plr."; + const string& prefix = myOSystem.settings().getBool("dev.settings") ? "dev." : "plr."; mySize = myOSystem.settings().getInt(prefix + "tm.size"); if(mySize != myStateList.capacity()) diff --git a/src/emucore/CartBUS.cxx b/src/emucore/CartBUS.cxx index f3799d67b..4aeb0123a 100644 --- a/src/emucore/CartBUS.cxx +++ b/src/emucore/CartBUS.cxx @@ -64,7 +64,7 @@ CartridgeBUS::CartridgeBUS(const BytePtr& image, uInt32 size, myDisplayImage = myBUSRAM + DSRAM; // Create Thumbulator ARM emulator - string prefix = settings.getBool("dev.settings") ? "plr." : "dev."; + const string& prefix = settings.getBool("dev.settings") ? "plr." : "dev."; myThumbEmulator = make_unique( reinterpret_cast(myImage), reinterpret_cast(myBUSRAM), settings.getBool(prefix + "thumb.trapfatal"), Thumbulator::ConfigureFor::BUS, this diff --git a/src/emucore/CartCDF.cxx b/src/emucore/CartCDF.cxx index 599cc9bc8..41a9aa1f7 100644 --- a/src/emucore/CartCDF.cxx +++ b/src/emucore/CartCDF.cxx @@ -67,7 +67,7 @@ CartridgeCDF::CartridgeCDF(const BytePtr& image, uInt32 size, setVersion(); // Create Thumbulator ARM emulator - string prefix = settings.getBool("dev.settings") ? "plr." : "dev."; + const string& prefix = settings.getBool("dev.settings") ? "plr." : "dev."; myThumbEmulator = make_unique( reinterpret_cast(myImage), reinterpret_cast(myCDFRAM), settings.getBool(prefix + "thumb.trapfatal"), myVersion ? diff --git a/src/emucore/CartDPCPlus.cxx b/src/emucore/CartDPCPlus.cxx index f6a3ab258..e457e1d4f 100644 --- a/src/emucore/CartDPCPlus.cxx +++ b/src/emucore/CartDPCPlus.cxx @@ -53,7 +53,7 @@ CartridgeDPCPlus::CartridgeDPCPlus(const BytePtr& image, uInt32 size, myFrequencyImage = myDisplayImage + 0x1000; // Create Thumbulator ARM emulator - string prefix = settings.getBool("dev.settings") ? "plr." : "dev."; + const string& prefix = settings.getBool("dev.settings") ? "plr." : "dev."; myThumbEmulator = make_unique (reinterpret_cast(myImage), reinterpret_cast(myDPCRAM), diff --git a/src/emucore/tia/TIA.cxx b/src/emucore/tia/TIA.cxx index 5886c25ed..7529ac0b0 100644 --- a/src/emucore/tia/TIA.cxx +++ b/src/emucore/tia/TIA.cxx @@ -200,7 +200,7 @@ void TIA::frameReset() memset(myBackBuffer, 0, 160 * TIAConstants::frameBufferHeight); memset(myFrontBuffer, 0, 160 * TIAConstants::frameBufferHeight); memset(myFramebuffer, 0, 160 * TIAConstants::frameBufferHeight); - enableColorLoss(mySettings.getBool("dev.settings") ? "dev.colorloss" : "plr.colorloss"); + enableColorLoss(mySettings.getBool(mySettings.getBool("dev.settings") ? "dev.colorloss" : "plr.colorloss")); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -