From 839f2e025c8281ac86577d8b0659fa115e2dce99 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Mon, 12 Feb 2024 03:19:08 +0100 Subject: [PATCH] Fix: visually also disable vsync when not using HW acceleration (#12066) --- 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