mirror of https://github.com/OpenTTD/OpenTTD.git
Fix e2425b7: Sprites no longer refreshed if max zoom level changed.
Handle this via AdjustGUIZoom() instead.
This commit is contained in:
parent
162ffc288d
commit
dc27f1649a
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue