Fix crash when launching game with non-default GUI scale in config

See: #459
This commit is contained in:
Jonathan G Rennison
2022-12-06 18:29:55 +00:00
parent e647075870
commit 351090ae7f
6 changed files with 16 additions and 10 deletions

View File

@@ -520,7 +520,7 @@ struct GameOptionsWindow : Window {
} else {
_gui_scale_cfg = -1;
this->SetWidgetLoweredState(WID_GO_GUI_SCALE_AUTO, true);
if (AdjustGUIZoom(false)) ReInitAllWindows(true);
if (AdjustGUIZoom(AGZM_MANUAL)) ReInitAllWindows(true);
this->gui_scale = _gui_scale;
}
this->SetWidgetDirty(widget);
@@ -564,7 +564,7 @@ struct GameOptionsWindow : Window {
_gui_scale_cfg = this->gui_scale;
if (AdjustGUIZoom(false)) {
if (AdjustGUIZoom(AGZM_MANUAL)) {
ReInitAllWindows(true);
this->SetWidgetLoweredState(WID_GO_GUI_SCALE_AUTO, false);
this->SetDirty();