From 120332c562826b9dfa9c7cf662123fd1958474cf Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 19 Mar 2019 17:09:32 +0000 Subject: [PATCH] Fix hang when setting r_maxfps to 0 while r_maxfpsoffset is a negative value git-svn-id: https://svn.eduke32.com/eduke32@7425 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/game.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/duke3d/src/game.h b/source/duke3d/src/game.h index 5161c0a2b..510c72113 100644 --- a/source/duke3d/src/game.h +++ b/source/duke3d/src/game.h @@ -341,7 +341,7 @@ extern palette_t CrosshairColors; extern palette_t DefaultCrosshairColors; extern double g_frameDelay; -static inline double calcFrameDelay(int maxFPS) { return maxFPS ? ((double)timerGetFreqU64() / (double)(maxFPS)) : 0.0; } +static inline double calcFrameDelay(int maxFPS) { return maxFPS > 0 ? ((double)timerGetFreqU64() / (double)(maxFPS)) : 0.0; } int32_t A_CheckInventorySprite(spritetype *s); int32_t A_InsertSprite(int16_t whatsect, int32_t s_x, int32_t s_y, int32_t s_z, int16_t s_pn, int8_t s_s, uint8_t s_xr,