summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Guilloux <glx22@users.noreply.github.com>2021-10-20 22:08:08 +0200
committerGitHub <noreply@github.com>2021-10-20 22:08:08 +0200
commitbc1b84cbbb3868edfe2e1acdb2ed0a1f7fafad02 (patch)
tree3fa97fda47f135a8be454cf2aa68ddbe9887e272
parentb043d58b9242a5ddd373c8194fe6df10f125cc5e (diff)
downloadopenttd-bc1b84cbbb3868edfe2e1acdb2ed0a1f7fafad02.tar.xz
Fix #9630: intro game could zoom in/out more than allowed by settings (#9633)
Also fixes #9622
-rw-r--r--src/main_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 944a28405..6131050cf 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -161,11 +161,11 @@ void FixTitleGameZoom(int zoom_adjust)
/* Adjust the zoom in/out.
* Can't simply add, since operator+ is not defined on the ZoomLevel type. */
vp->zoom = _gui_zoom;
- while (zoom_adjust < 0 && vp->zoom != ZOOM_LVL_MIN) {
+ while (zoom_adjust < 0 && vp->zoom != _settings_client.gui.zoom_min) {
vp->zoom--;
zoom_adjust++;
}
- while (zoom_adjust > 0 && vp->zoom != ZOOM_LVL_MAX) {
+ while (zoom_adjust > 0 && vp->zoom != _settings_client.gui.zoom_max) {
vp->zoom++;
zoom_adjust--;
}