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);
|
FBSurface::setPalette(myPalette);
|
||||||
|
|
||||||
myGrabMouse = myOSystem.settings().getBool("grabmouse");
|
myGrabMouse = myOSystem.settings().getBool("grabmouse");
|
||||||
|
myZoomMode = myOSystem.settings().getInt("tia.zoom");
|
||||||
|
|
||||||
// Create a TIA surface; we need it for rendering TIA images
|
// Create a TIA surface; we need it for rendering TIA images
|
||||||
myTIASurface = make_unique<TIASurface>(myOSystem);
|
myTIASurface = make_unique<TIASurface>(myOSystem);
|
||||||
|
@ -575,7 +576,7 @@ bool FrameBuffer::changeWindowedVidMode(int direction)
|
||||||
|
|
||||||
resetSurfaces();
|
resetSurfaces();
|
||||||
showMessage(mode.description);
|
showMessage(mode.description);
|
||||||
myOSystem.settings().setValue("tia.zoom", mode.zoom);
|
myZoomMode = mode.zoom;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -733,11 +734,17 @@ const VideoMode& FrameBuffer::getSavedVidMode(bool fullscreen)
|
||||||
if(state == EventHandler::S_DEBUGGER || state == EventHandler::S_LAUNCHER)
|
if(state == EventHandler::S_DEBUGGER || state == EventHandler::S_LAUNCHER)
|
||||||
myCurrentModeList->setZoom(1);
|
myCurrentModeList->setZoom(1);
|
||||||
else
|
else
|
||||||
myCurrentModeList->setZoom(myOSystem.settings().getInt("tia.zoom"));
|
myCurrentModeList->setZoom(myZoomMode);
|
||||||
|
|
||||||
return myCurrentModeList->current();
|
return myCurrentModeList->current();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
void FrameBuffer::setZoomMode(uInt32 mode)
|
||||||
|
{
|
||||||
|
myZoomMode = mode;
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
//
|
//
|
||||||
// VideoMode implementation
|
// VideoMode implementation
|
||||||
|
|
|
@ -187,6 +187,11 @@ class FrameBuffer
|
||||||
*/
|
*/
|
||||||
const VariantList& supportedTIAZoomLevels() const { return myTIAZoomLevels; }
|
const VariantList& supportedTIAZoomLevels() const { return myTIAZoomLevels; }
|
||||||
|
|
||||||
|
/*
|
||||||
|
Set the current zoom mode.
|
||||||
|
*/
|
||||||
|
void setZoomMode(uInt32 mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get the font object(s) of the framebuffer
|
Get the font object(s) of the framebuffer
|
||||||
*/
|
*/
|
||||||
|
@ -232,7 +237,7 @@ class FrameBuffer
|
||||||
void enableGrabMouse(bool enable);
|
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();
|
void toggleGrabMouse();
|
||||||
|
|
||||||
|
@ -498,6 +503,9 @@ class FrameBuffer
|
||||||
// Names of the TIA zoom levels that can be used for this framebuffer
|
// Names of the TIA zoom levels that can be used for this framebuffer
|
||||||
VariantList myTIAZoomLevels;
|
VariantList myTIAZoomLevels;
|
||||||
|
|
||||||
|
// curently selected zoom mode
|
||||||
|
uInt32 myZoomMode;
|
||||||
|
|
||||||
// Holds a reference to all the surfaces that have been created
|
// Holds a reference to all the surfaces that have been created
|
||||||
vector<shared_ptr<FBSurface>> mySurfaceList;
|
vector<shared_ptr<FBSurface>> mySurfaceList;
|
||||||
|
|
||||||
|
|
|
@ -471,6 +471,7 @@ void VideoDialog::saveConfig()
|
||||||
// TIA Filter
|
// TIA Filter
|
||||||
instance().settings().setValue("tia.zoom",
|
instance().settings().setValue("tia.zoom",
|
||||||
myTIAZoom->getSelectedTag().toString());
|
myTIAZoom->getSelectedTag().toString());
|
||||||
|
instance().frameBuffer().setZoomMode(instance().settings().getInt("tia.zoom"));
|
||||||
|
|
||||||
// TIA Palette
|
// TIA Palette
|
||||||
instance().settings().setValue("palette",
|
instance().settings().setValue("palette",
|
||||||
|
|
Loading…
Reference in New Issue