mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-29 01:19:11 +00:00
Fix: Window width/height was doubly-scaled with automatic DPI switch.
This commit is contained in:
@@ -2002,8 +2002,6 @@ bool AdjustGUIZoom(bool automatic)
|
|||||||
if (automatic) {
|
if (automatic) {
|
||||||
w->left = (w->left * _gui_scale) / old_scale;
|
w->left = (w->left * _gui_scale) / old_scale;
|
||||||
w->top = (w->top * _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) {
|
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 = Clamp(ZoomLevel(w->viewport->zoom - zoom_shift), _settings_client.gui.zoom_min, _settings_client.gui.zoom_max);
|
||||||
|
Reference in New Issue
Block a user