summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2021-10-17 18:24:04 +0100
committerCharles Pigott <charlespigott@googlemail.com>2021-10-17 19:25:03 +0100
commite09f251fc6da7026922a431def468fdbcee2d3d0 (patch)
tree662cb2e46502863146f161fe2007b04ca15bf6cc /src
parent0853c1979ba3c778f0d1628276ed8cbe968b328e (diff)
downloadopenttd-e09f251fc6da7026922a431def468fdbcee2d3d0.tar.xz
Fix #9614: Refresh rate dropdown was still active when vsync was enabled
Diffstat (limited to 'src')
-rw-r--r--src/settings_gui.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index ae894cd50..3e7a0fbb1 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -469,6 +469,8 @@ struct GameOptionsWindow : Window {
this->SetWidgetLoweredState(WID_GO_VIDEO_VSYNC_BUTTON, _video_vsync);
this->SetWidgetDirty(WID_GO_VIDEO_VSYNC_BUTTON);
+ this->SetWidgetDisabledState(WID_GO_REFRESH_RATE_DROPDOWN, _video_vsync);
+ this->SetWidgetDirty(WID_GO_REFRESH_RATE_DROPDOWN);
break;
case WID_GO_BASE_SFX_VOLUME:
@@ -608,6 +610,7 @@ struct GameOptionsWindow : Window {
if (!gui_scope) return;
this->SetWidgetLoweredState(WID_GO_FULLSCREEN_BUTTON, _fullscreen);
this->SetWidgetLoweredState(WID_GO_VIDEO_ACCEL_BUTTON, _video_hw_accel);
+ this->SetWidgetDisabledState(WID_GO_REFRESH_RATE_DROPDOWN, _video_vsync);
#ifndef __APPLE__
this->SetWidgetLoweredState(WID_GO_VIDEO_VSYNC_BUTTON, _video_vsync);