1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 09:59:10 +00:00

Fix: visually also disable vsync when not using HW acceleration (#12066)

This commit is contained in:
Patric Stout
2024-02-12 03:19:08 +01:00
committed by GitHub
parent 5ab5f4ace7
commit 839f2e025c

View File

@@ -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