Fix: Use correct fps value for frame interpolation with match refresh rate (#2694)

This commit is contained in:
Adam Bird 2023-04-11 18:54:10 -04:00 committed by GitHub
parent 059df8187e
commit ac506c8b3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -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) { 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); SohImGui::GetGameOverlay()->TextDrawNotification(duration, true, text);
} }

View file

@ -6,6 +6,7 @@
#include <math.h> #include <math.h>
#include "frame_interpolation.h" #include "frame_interpolation.h"
#include "soh/OTRGlobals.h"
/* /*
Frame interpolation. Frame interpolation.
@ -451,7 +452,7 @@ void FrameInterpolation_StartRecord(void) {
current_recording = {}; current_recording = {};
current_path.clear(); current_path.clear();
current_path.push_back(&current_recording.root_path); current_path.push_back(&current_recording.root_path);
if (CVarGetInteger("gInterpolationFPS", 20) != 20) { if (OTRGlobals::Instance->GetInterpolationFPS() != 20) {
is_recording = true; is_recording = true;
} }
} }