Changeset - r28303:33171aadc9f1
[Not reviewed]
master
0 1 0
Peter Nelson - 12 months ago 2023-12-18 13:05:06
peter1138@openttd.org
Fix: Window width/height was doubly-scaled with automatic DPI switch. (#11598)
1 file changed with 0 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/gfx.cpp
Show inline comments
 
@@ -2002,8 +2002,6 @@ bool AdjustGUIZoom(bool automatic)
 
		if (automatic) {
 
			w->left   = (w->left   * _gui_scale) / old_scale;
 
			w->top    = (w->top    * _gui_scale) / old_scale;
 
			w->width  = (w->width  * _gui_scale) / old_scale;
 
			w->height = (w->height * _gui_scale) / old_scale;
 
		}
 
		if (w->viewport != nullptr) {
 
			w->viewport->zoom = Clamp(ZoomLevel(w->viewport->zoom - zoom_shift), _settings_client.gui.zoom_min, _settings_client.gui.zoom_max);
0 comments (0 inline, 0 general)