mirror of https://github.com/OpenTTD/OpenTTD
This happened due to converting the new value to unsigned before clamping instead of after.pull/11619/head
parent
c1afbc9415
commit
fd0aa3dd19
|
@ -2005,7 +2005,7 @@ bool AdjustGUIZoom(bool automatic)
|
||||||
w->top = (w->top * _gui_scale) / old_scale;
|
w->top = (w->top * _gui_scale) / old_scale;
|
||||||
}
|
}
|
||||||
if (w->viewport != nullptr) {
|
if (w->viewport != nullptr) {
|
||||||
w->viewport->zoom = Clamp(ZoomLevel(w->viewport->zoom - zoom_shift), _settings_client.gui.zoom_min, _settings_client.gui.zoom_max);
|
w->viewport->zoom = static_cast<ZoomLevel>(Clamp(w->viewport->zoom - zoom_shift, _settings_client.gui.zoom_min, _settings_client.gui.zoom_max));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue