Skip to content

Commit

Permalink
fix current zoom level when enabling bezels
Browse files Browse the repository at this point in the history
  • Loading branch information
thrust26 committed Aug 26, 2023
1 parent 1c12621 commit 3f05523
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

* 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.

Expand Down
8 changes: 8 additions & 0 deletions src/emucore/FrameBuffer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,14 @@ void FrameBuffer::toggleBezel(bool toggle)
enabled = !enabled;
myOSystem.settings().setValue("bezel.show", enabled);
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();
}
}
Expand Down

0 comments on commit 3f05523

Please sign in to comment.