feat: allow toggling vsync, fix: vrr support (#2716)

This commit is contained in:
briaguya 2023-04-20 20:57:32 -04:00 committed by GitHub
parent 853bff3e41
commit 37390c441f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

@ -1 +1 @@
Subproject commit 709546598603966e5e09d7915fdd9117e5447591
Subproject commit 10bd53be80e842052b9c68aa64c03b8548dd58d8

View File

@ -227,6 +227,10 @@ namespace GameMenuBar {
UIWidgets::ReEnableComponent("");
}
if (Ship::Window::GetInstance()->CanDisableVerticalSync()) {
UIWidgets::PaddedEnhancementCheckbox("Enable Vsync", "gVsyncEnabled", true, false);
}
if (SohImGui::SupportsWindowedFullscreen()) {
UIWidgets::PaddedEnhancementCheckbox("Windowed fullscreen", "gSdlWindowedFullscreen", true, false);
}

View File

@ -320,7 +320,11 @@ bool OTRGlobals::HasOriginal() {
}
uint32_t OTRGlobals::GetInterpolationFPS() {
if (CVarGetInteger("gMatchRefreshRate", 0) && SohImGui::WindowBackend() != SohImGui::Backend::DX11) {
if (SohImGui::WindowBackend() == SohImGui::Backend::DX11) {
return CVarGetInteger("gInterpolationFPS", 20);
}
if (CVarGetInteger("gMatchRefreshRate", 0)) {
return Ship::Window::GetInstance()->GetCurrentRefreshRate();
}