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
3 changed files with 10 additions and 2 deletions

View File

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

View File

@@ -320,7 +320,11 @@ bool OTRGlobals::HasOriginal() {
} }
uint32_t OTRGlobals::GetInterpolationFPS() { 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(); return Ship::Window::GetInstance()->GetCurrentRefreshRate();
} }