Skip to content

Commit

Permalink
Also clamp if V-Sync can't be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Spodi committed Feb 21, 2025
1 parent 08e91eb commit 0987c6d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions soh/soh/OTRGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,7 @@ bool OTRGlobals::HasOriginal() {
uint32_t OTRGlobals::GetInterpolationFPS() {
if (CVarGetInteger(CVAR_SETTING("MatchRefreshRate"), 0)) {
return Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate();
}
else if (CVarGetInteger(CVAR_VSYNC_ENABLED, 1)) {
} else if (CVarGetInteger(CVAR_VSYNC_ENABLED, 1) || !Ship::Context::GetInstance()->GetWindow()->CanDisableVerticalSync()) {
return std::min<uint32_t>(Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(), CVarGetInteger(CVAR_SETTING("InterpolationFPS"), 20));
}
return CVarGetInteger(CVAR_SETTING("InterpolationFPS"), 20);
Expand Down

0 comments on commit 0987c6d

Please sign in to comment.