fix current zoom level when enabling bezels

This commit is contained in:
thrust26 2023-08-26 18:21:58 +02:00
parent 1c126218b6
commit 3f05523e16
2 changed files with 9 additions and 1 deletions

View File

@ -24,7 +24,7 @@
* Added 2nd UI theme and hotkey for toggling UI theme. * Added 2nd UI theme and hotkey for toggling UI theme.
* Added bezel support. * Added bezel support (incl. Sinden Lightgun).
* Added optional type format detection based on colors used. * Added optional type format detection based on colors used.

View File

@ -1277,6 +1277,14 @@ void FrameBuffer::toggleBezel(bool toggle)
enabled = !enabled; enabled = !enabled;
myOSystem.settings().setValue("bezel.show", enabled); myOSystem.settings().setValue("bezel.show", enabled);
myBezel->load(); myBezel->load();
// Determine possible TIA windowed zoom levels
const double currentTIAZoom =
static_cast<double>(myOSystem.settings().getFloat("tia.zoom"));
myOSystem.settings().setValue("tia.zoom",
BSPF::clamp(currentTIAZoom, supportedTIAMinZoom(), supportedTIAMaxZoom()));
saveCurrentWindowPosition();
applyVideoMode(); applyVideoMode();
} }
} }