Skip to content

Commit ad2a902

Browse files
committed
Fix a typo that prevented IsDroppingFrames() from working
(Maybe more than a mere typo, but a typo was involved.)
1 parent 34b3eff commit ad2a902

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

soh/soh/Enhancements/resolution-editor/ResolutionEditor.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,9 @@ void AdvancedResolutionSettingsWindow::UpdateElement() {
406406
bool AdvancedResolutionSettingsWindow::IsDroppingFrames() {
407407
// a rather imprecise way of checking for frame drops.
408408
// but it's mostly there to inform the player of large drops.
409-
const float threshold = CVarGetInteger("gInterpolationFPS", 20) / 20.0f - 4.1f;
410-
return ImGui::GetIO().Framerate < threshold;
409+
const short targetFPS = CVarGetInteger("gInterpolationFPS", 20);
410+
const float threshold = targetFPS / 20.0f + 4.1f;
411+
return ImGui::GetIO().Framerate < targetFPS - threshold;
411412
}
412413

413414
bool AdvancedResolutionSettingsWindow::IsBoolArrayTrue(bool* foo) {

0 commit comments

Comments
 (0)