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
This commit is contained in:
terminx 2019-03-19 17:09:32 +00:00 committed by Christoph Oelckers
parent 4506b8490f
commit 120332c562

View file

@ -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,