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;
|
ZoomLevel old_font_zoom = _font_zoom;
|
||||||
int old_scale = _gui_scale;
|
int old_scale = _gui_scale;
|
||||||
UpdateGUIZoom();
|
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. */
|
/* Reload sprites if sprite zoom level has changed. */
|
||||||
if (old_gui_zoom != _gui_zoom) {
|
if (old_gui_zoom != _gui_zoom) {
|
||||||
|
|
|
@ -265,11 +265,7 @@ static void ZoomMinMaxChanged(int32_t)
|
||||||
{
|
{
|
||||||
ConstrainAllViewportsZoom();
|
ConstrainAllViewportsZoom();
|
||||||
GfxClearSpriteCache();
|
GfxClearSpriteCache();
|
||||||
if (_settings_client.gui.zoom_min > _gui_zoom) {
|
if (AdjustGUIZoom(false)) {
|
||||||
/* Restrict GUI zoom if it is no longer available. */
|
|
||||||
_gui_zoom = _settings_client.gui.zoom_min;
|
|
||||||
UpdateCursorSize();
|
|
||||||
LoadStringWidthTable();
|
|
||||||
ReInitAllWindows(true);
|
ReInitAllWindows(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue