From e14d7d2786ad8a714d9963f0ffb6a5ddf1bfed57 Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 24 Jun 2017 06:31:12 +0000 Subject: [PATCH] Clamp r_maxfps to a minimum of 30 if not 0 git-svn-id: https://svn.eduke32.com/eduke32@6249 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/osdcmds.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/duke3d/src/osdcmds.cpp b/source/duke3d/src/osdcmds.cpp index c8e09e33a..727f6ac0f 100644 --- a/source/duke3d/src/osdcmds.cpp +++ b/source/duke3d/src/osdcmds.cpp @@ -1411,6 +1411,7 @@ static int32_t osdcmd_cvar_set_game(const osdfuncparm_t *parm) } else if (!Bstrcasecmp(parm->name, "r_maxfps")) { + if (r_maxfps != 0) r_maxfps = clamp(r_maxfps, 30, 1000); g_frameDelay = r_maxfps ? Blrintf(1000.f/(float)r_maxfps) : 0; } else if (!Bstrcasecmp(parm->name, "r_ambientlight"))