Clamp nextPageDelay in G_FPSLimit() to 0.0 - g_frameDelay

git-svn-id: https://svn.eduke32.com/eduke32@8148 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-10-19 23:42:13 +00:00 committed by Christoph Oelckers
parent 53248945e8
commit a649130327

View file

@ -6315,6 +6315,8 @@ int G_FPSLimit(void)
static double nextPageDelay; static double nextPageDelay;
static uint64_t lastFrameTicks; static uint64_t lastFrameTicks;
nextPageDelay = clamp(nextPageDelay, 0.0, g_frameDelay);
uint64_t const frameTicks = timerGetTicksU64(); uint64_t const frameTicks = timerGetTicksU64();
uint64_t const elapsedTime = frameTicks - lastFrameTicks; uint64_t const elapsedTime = frameTicks - lastFrameTicks;
double const dElapsedTime = elapsedTime; double const dElapsedTime = elapsedTime;