diff options
author | StapleButter <thetotalworm@gmail.com> | 2019-09-01 23:04:06 +0200 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2019-09-01 23:04:06 +0200 |
commit | a4f9187b9b06ef3babb7659bf563b809a328e6e5 (patch) | |
tree | 2de733d100b6b87a62068b94dadd761c68e63871 | |
parent | f70ee39543e7c57ebca8c02f025798d347e3aef2 (diff) |
fix bug with vsync checkbox
-rw-r--r-- | src/libui_sdl/DlgVideoSettings.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libui_sdl/DlgVideoSettings.cpp b/src/libui_sdl/DlgVideoSettings.cpp index 155fe8b..afa7357 100644 --- a/src/libui_sdl/DlgVideoSettings.cpp +++ b/src/libui_sdl/DlgVideoSettings.cpp @@ -137,6 +137,10 @@ void OnRendererChanged(uiRadioButtons* rb, void* blarg) UpdateControls(); bool new_usegl = (Config::ScreenUseGL != 0) || (Config::_3DRenderer != 0); + + if (new_usegl) uiControlEnable(uiControl(cbVSync)); + else uiControlDisable(uiControl(cbVSync)); + if (new_usegl != old_usegl) ApplyNewSettings(2); else @@ -332,8 +336,10 @@ void Open() uiRadioButtonsSetSelected(rbRenderer, Config::_3DRenderer); UpdateControls(); - if (Config::ScreenUseGL) uiControlEnable(uiControl(cbVSync)); - else uiControlDisable(uiControl(cbVSync)); + if (Config::ScreenUseGL || Config::_3DRenderer != 0) + uiControlEnable(uiControl(cbVSync)); + else + uiControlDisable(uiControl(cbVSync)); uiControlShow(uiControl(win)); } |