Changeset - r28281:c4600c8a8dfe
[Not reviewed]
master
0 2 0
Peter Nelson - 12 months ago 2023-12-11 12:30:20
peter1138@openttd.org
Fix e2425b7: Sprites no longer refreshed if max zoom level changed.

Handle this via AdjustGUIZoom() instead.
2 files changed with 2 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/gfx.cpp
Show inline comments
 
@@ -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) {
src/settings_table.cpp
Show inline comments
 
@@ -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);
 
	}
 
}
0 comments (0 inline, 0 general)