From af7acad4b002e5b4b096160b1928f2bc061e6d26 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 11 Feb 2024 20:53:46 +0100 Subject: [PATCH] Fix: visually also disable vsync when not using HW acceleration --- src/settings_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 07ec5ac1e6..4c76cf9c04 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -728,6 +728,7 @@ struct GameOptionsWindow : Window { this->SetWidgetLoweredState(WID_GO_VIDEO_ACCEL_BUTTON, _video_hw_accel); this->SetWidgetDirty(WID_GO_VIDEO_ACCEL_BUTTON); #ifndef __APPLE__ + this->SetWidgetLoweredState(WID_GO_VIDEO_VSYNC_BUTTON, _video_hw_accel && _video_vsync); this->SetWidgetDisabledState(WID_GO_VIDEO_VSYNC_BUTTON, !_video_hw_accel); this->SetWidgetDirty(WID_GO_VIDEO_VSYNC_BUTTON); #endif @@ -968,7 +969,7 @@ struct GameOptionsWindow : Window { this->SetWidgetDisabledState(WID_GO_REFRESH_RATE_DROPDOWN, _video_vsync); #ifndef __APPLE__ - this->SetWidgetLoweredState(WID_GO_VIDEO_VSYNC_BUTTON, _video_vsync); + this->SetWidgetLoweredState(WID_GO_VIDEO_VSYNC_BUTTON, _video_hw_accel && _video_vsync); this->SetWidgetDisabledState(WID_GO_VIDEO_VSYNC_BUTTON, !_video_hw_accel); #endif