summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSonic Dreamcaster <alejandro.asenjo88@gmail.com>2024-12-22 16:59:38 -0300
committerSonic Dreamcaster <alejandro.asenjo88@gmail.com>2024-12-22 16:59:38 -0300
commit1f583935325386ff0afa84c8d9e20232a10d4f27 (patch)
treef8cbf146bae3583830fd2f30c438ed51cda9ad6e
parentbcf12744d2a4e2dd5a27325ac11dd5ce4d8e2547 (diff)
fix interpolation issue
-rw-r--r--src/port/Engine.cpp4
-rw-r--r--src/port/interpolation/FrameInterpolation.cpp2
-rw-r--r--src/port/ui/ImguiUI.cpp2
-rw-r--r--src/port/ui/ResolutionEditor.cpp4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/port/Engine.cpp b/src/port/Engine.cpp
index d8c9da22..15b0f17d 100644
--- a/src/port/Engine.cpp
+++ b/src/port/Engine.cpp
@@ -385,7 +385,7 @@ void GameEngine::ProcessGfxCommands(Gfx* commands) {
uint32_t GameEngine::GetInterpolationFPS() {
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() == Ship::WindowBackend::FAST3D_DXGI_DX11) {
- return CVarGetInteger("gInterpolationFPS", 20);
+ return CVarGetInteger("gInterpolationFPS", 60);
}
if (CVarGetInteger("gMatchRefreshRate", 0)) {
@@ -393,7 +393,7 @@ uint32_t GameEngine::GetInterpolationFPS() {
}
return std::min<uint32_t>(Ship::Context::GetInstance()->GetWindow()->GetCurrentRefreshRate(),
- CVarGetInteger("gInterpolationFPS", 20));
+ CVarGetInteger("gInterpolationFPS", 60));
}
extern "C" uint32_t GameEngine_GetSampleRate() {
diff --git a/src/port/interpolation/FrameInterpolation.cpp b/src/port/interpolation/FrameInterpolation.cpp
index 19507094..8d6c31ce 100644
--- a/src/port/interpolation/FrameInterpolation.cpp
+++ b/src/port/interpolation/FrameInterpolation.cpp
@@ -484,7 +484,7 @@ void FrameInterpolation_RecordMarker(const char* file, int line) {
if (!is_recording)
return;
- append(Op::Marker).marker = { file, line };
+ // append(Op::Marker).marker = { file, line };
}
void FrameInterpolation_RecordMatrixPop(Matrix** matrix) {
diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp
index 27e23b4b..af9c6f22 100644
--- a/src/port/ui/ImguiUI.cpp
+++ b/src/port/ui/ImguiUI.cpp
@@ -282,7 +282,7 @@ void DrawSettingsMenu(){
#else
bool matchingRefreshRate =
CVarGetInteger("gMatchRefreshRate", 0) && Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() != Ship::WindowBackend::FAST3D_DXGI_DX11;
- UIWidgets::CVarSliderInt((currentFps == 20) ? "FPS: Original (20)" : "FPS: %d", "gInterpolationFPS", minFps, maxFps, 30, {
+ UIWidgets::CVarSliderInt((currentFps == 30) ? "FPS: Original (30)" : "FPS: %d", "gInterpolationFPS", minFps, maxFps, 60, {
.disabled = matchingRefreshRate
});
#endif
diff --git a/src/port/ui/ResolutionEditor.cpp b/src/port/ui/ResolutionEditor.cpp
index f28ae392..cac3b8be 100644
--- a/src/port/ui/ResolutionEditor.cpp
+++ b/src/port/ui/ResolutionEditor.cpp
@@ -59,7 +59,7 @@ namespace AdvancedResolutionSettings {
for (unsigned short i = 0; i < sizeof(setting); i++)
update[i] = false;
static short updateCountdown = 0;
- short countdownStartingValue = CVarGetInteger("gInterpolationFPS", 20) / 2; // half of a second, in frames.
+ short countdownStartingValue = CVarGetInteger("gInterpolationFPS", 60) / 2; // half of a second, in frames.
// Initialise integer scale bounds.
short max_integerScaleFactor = default_maxIntegerScaleFactor; // default value, which may or may not get
@@ -408,7 +408,7 @@ namespace AdvancedResolutionSettings {
bool AdvancedResolutionSettingsWindow::IsDroppingFrames() {
// a rather imprecise way of checking for frame drops.
// but it's mostly there to inform the player of large drops.
- const short targetFPS = CVarGetInteger("gInterpolationFPS", 20);
+ const short targetFPS = CVarGetInteger("gInterpolationFPS", 60);
const float threshold = targetFPS / 20.0f + 4.1f;
return ImGui::GetIO().Framerate < targetFPS - threshold;
}