From a6491303278da25c96d4e544db7d9853be60465a Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 19 Oct 2019 23:42:13 +0000 Subject: [PATCH] Clamp nextPageDelay in G_FPSLimit() to 0.0 - g_frameDelay git-svn-id: https://svn.eduke32.com/eduke32@8148 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/game.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index d05e360b8..f857e23ca 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -6315,6 +6315,8 @@ int G_FPSLimit(void) static double nextPageDelay; static uint64_t lastFrameTicks; + nextPageDelay = clamp(nextPageDelay, 0.0, g_frameDelay); + uint64_t const frameTicks = timerGetTicksU64(); uint64_t const elapsedTime = frameTicks - lastFrameTicks; double const dElapsedTime = elapsedTime;