diff options
| author | Adam Bird <Archez@users.noreply.github.com> | 2023-04-11 18:54:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-11 18:54:10 -0400 |
| commit | ac506c8b3e6c577e241a5fa1d7637801e6b58ea6 (patch) | |
| tree | f0d5403266bffc489a3e4b333bc7fafc3ad08316 | |
| parent | 059df8187ef4ad070e315920f532f3dcc57ad5e6 (diff) | |
Fix: Use correct fps value for frame interpolation with match refresh rate (#2694)
| -rw-r--r-- | soh/soh/OTRGlobals.cpp | 2 | ||||
| -rw-r--r-- | soh/soh/frame_interpolation.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index a3a969f67..d3e038a63 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1854,7 +1854,7 @@ extern "C" void Overlay_DisplayText(float duration, const char* text) { } extern "C" void Overlay_DisplayText_Seconds(int seconds, const char* text) { - float duration = seconds * CVarGetInteger("gInterpolationFPS", 20) * 0.05; + float duration = seconds * OTRGlobals::Instance->GetInterpolationFPS() * 0.05; SohImGui::GetGameOverlay()->TextDrawNotification(duration, true, text); } diff --git a/soh/soh/frame_interpolation.cpp b/soh/soh/frame_interpolation.cpp index f4709d3bc..c42f0e89f 100644 --- a/soh/soh/frame_interpolation.cpp +++ b/soh/soh/frame_interpolation.cpp @@ -6,6 +6,7 @@ #include <math.h> #include "frame_interpolation.h" +#include "soh/OTRGlobals.h" /* Frame interpolation. @@ -451,7 +452,7 @@ void FrameInterpolation_StartRecord(void) { current_recording = {}; current_path.clear(); current_path.push_back(¤t_recording.root_path); - if (CVarGetInteger("gInterpolationFPS", 20) != 20) { + if (OTRGlobals::Instance->GetInterpolationFPS() != 20) { is_recording = true; } } |
