mirror of https://github.com/stella-emu/stella.git
made "tia.zoom" hotkeys toggle settings temporary only
This commit is contained in:
parent
d6680a681f
commit
63f8605977
|
@ -143,6 +143,7 @@ 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<TIASurface>(myOSystem);
|
||||
|
@ -575,7 +576,7 @@ bool FrameBuffer::changeWindowedVidMode(int direction)
|
|||
|
||||
resetSurfaces();
|
||||
showMessage(mode.description);
|
||||
myOSystem.settings().setValue("tia.zoom", mode.zoom);
|
||||
myZoomMode = mode.zoom;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
@ -733,11 +734,17 @@ const VideoMode& FrameBuffer::getSavedVidMode(bool fullscreen)
|
|||
if(state == EventHandler::S_DEBUGGER || state == EventHandler::S_LAUNCHER)
|
||||
myCurrentModeList->setZoom(1);
|
||||
else
|
||||
myCurrentModeList->setZoom(myOSystem.settings().getInt("tia.zoom"));
|
||||
myCurrentModeList->setZoom(myZoomMode);
|
||||
|
||||
return myCurrentModeList->current();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void FrameBuffer::setZoomMode(uInt32 mode)
|
||||
{
|
||||
myZoomMode = mode;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
//
|
||||
// VideoMode implementation
|
||||
|
|
|
@ -187,6 +187,11 @@ 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
|
||||
*/
|
||||
|
@ -232,7 +237,7 @@ class FrameBuffer
|
|||
void enableGrabMouse(bool enable);
|
||||
|
||||
/**
|
||||
Toggles the use of grabmouse (only has effect in emulation mode).
|
||||
Toggles the use of grabmouse (only has effect in emulation mode).
|
||||
*/
|
||||
void toggleGrabMouse();
|
||||
|
||||
|
@ -498,6 +503,9 @@ 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<shared_ptr<FBSurface>> mySurfaceList;
|
||||
|
||||
|
|
|
@ -471,6 +471,7 @@ 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",
|
||||
|
|
Loading…
Reference in New Issue