From f4db8e4816607083bb330a9f93a8126448ac3b6a Mon Sep 17 00:00:00 2001 From: thrust26 Date: Fri, 2 Feb 2018 22:51:22 +0100 Subject: [PATCH] fixed zoom settings via hotkey (made persistent again) --- src/emucore/FrameBuffer.cxx | 11 ++--------- src/emucore/FrameBuffer.hxx | 8 -------- src/gui/VideoDialog.cxx | 1 - 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index a09ce847b..87a27b89f 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -150,7 +150,6 @@ bool FrameBuffer::initialize() FBSurface::setPalette(myPalette); myGrabMouse = myOSystem.settings().getBool("grabmouse"); - myZoomMode = myOSystem.settings().getInt("tia.zoom"); // Create a TIA surface; we need it for rendering TIA images myTIASurface = make_unique(myOSystem); @@ -652,7 +651,7 @@ bool FrameBuffer::changeWindowedVidMode(int direction) resetSurfaces(); showMessage(mode.description); - myZoomMode = mode.zoom; + myOSystem.settings().setValue("tia.zoom", mode.zoom); return true; } #endif @@ -811,17 +810,11 @@ const VideoMode& FrameBuffer::getSavedVidMode(bool fullscreen) if(state == EventHandlerState::DEBUGGER || state == EventHandlerState::LAUNCHER) myCurrentModeList->setZoom(1); else - myCurrentModeList->setZoom(myZoomMode); + myCurrentModeList->setZoom(myOSystem.settings().getInt("tia.zoom")); return myCurrentModeList->current(); } -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void FrameBuffer::setZoomMode(uInt32 mode) -{ - myZoomMode = mode; -} - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // // VideoMode implementation diff --git a/src/emucore/FrameBuffer.hxx b/src/emucore/FrameBuffer.hxx index eb834815e..e1c7bb408 100644 --- a/src/emucore/FrameBuffer.hxx +++ b/src/emucore/FrameBuffer.hxx @@ -192,11 +192,6 @@ class FrameBuffer */ const VariantList& supportedTIAZoomLevels() const { return myTIAZoomLevels; } - /* - Set the current zoom mode. - */ - void setZoomMode(uInt32 mode); - /** Get the font object(s) of the framebuffer */ @@ -528,9 +523,6 @@ class FrameBuffer // Names of the TIA zoom levels that can be used for this framebuffer VariantList myTIAZoomLevels; - // curently selected zoom mode - uInt32 myZoomMode; - // Holds a reference to all the surfaces that have been created vector> mySurfaceList; diff --git a/src/gui/VideoDialog.cxx b/src/gui/VideoDialog.cxx index 6569260d7..0a6901eda 100644 --- a/src/gui/VideoDialog.cxx +++ b/src/gui/VideoDialog.cxx @@ -410,7 +410,6 @@ void VideoDialog::saveConfig() // TIA Filter instance().settings().setValue("tia.zoom", myTIAZoom->getSelectedTag().toString()); - instance().frameBuffer().setZoomMode(instance().settings().getInt("tia.zoom")); // TIA Palette instance().settings().setValue("palette",