# HG changeset patch # User Loïc Guilloux # Date 2021-10-20 20:08:08 # Node ID c542cabb8e9cd3acd729988615abb131967f8daf # Parent 6a8166916d96bd6cf946ea853d4f96b94a1dfa89 Fix #9630: intro game could zoom in/out more than allowed by settings (#9633) Also fixes #9622 diff --git a/src/main_gui.cpp b/src/main_gui.cpp --- 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--; }