Skip to content

Commit

Permalink
Fix e2425b7: Sprites no longer refreshed if max zoom level changed.
Browse files Browse the repository at this point in the history
Handle this via AdjustGUIZoom() instead.
  • Loading branch information
PeterN committed Dec 11, 2023
1 parent 162ffc2 commit dc27f16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/gfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1980,7 +1980,7 @@ bool AdjustGUIZoom(bool automatic)
ZoomLevel old_font_zoom = _font_zoom;
int old_scale = _gui_scale;
UpdateGUIZoom();
if (old_scale == _gui_scale) return false;
if (old_scale == _gui_scale && old_gui_zoom == _gui_zoom) return false;

/* Reload sprites if sprite zoom level has changed. */
if (old_gui_zoom != _gui_zoom) {
Expand Down
6 changes: 1 addition & 5 deletions src/settings_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,7 @@ static void ZoomMinMaxChanged(int32_t)
{
ConstrainAllViewportsZoom();
GfxClearSpriteCache();
if (_settings_client.gui.zoom_min > _gui_zoom) {
/* Restrict GUI zoom if it is no longer available. */
_gui_zoom = _settings_client.gui.zoom_min;
UpdateCursorSize();
LoadStringWidthTable();
if (AdjustGUIZoom(false)) {
ReInitAllWindows(true);
}
}
Expand Down

0 comments on commit dc27f16

Please sign in to comment.