cvar_t cl_minfps_qualitymin = {CVAR_SAVE, "cl_minfps_qualitymin", "0.25", "lowest allowed drawdistance multiplier"};
cvar_t cl_minfps_qualitypower = {CVAR_SAVE, "cl_minfps_qualitypower", "4", "raises quality value to a power of itself, higher values make quality drop more sharply in relation to framerate"};
cvar_t cl_minfps_qualityscale = {CVAR_SAVE, "cl_minfps_qualityscale", "0.5", "multiplier for quality"};
-cvar_t cl_maxfps = {CVAR_SAVE, "cl_maxfps", "1000000", "maximum fps cap, if game is running faster than this it will wait before running another frame (useful to make cpu time available to other programs)"};
+cvar_t cl_maxfps = {CVAR_SAVE, "cl_maxfps", "1000000", "maximum fps cap, 0 = unlimited, if game is running faster than this it will wait before running another frame (useful to make cpu time available to other programs)"};
cvar_t cl_maxidlefps = {CVAR_SAVE, "cl_maxidlefps", "20", "maximum fps cap when the game is not the active window (makes cpu time available to other programs"};
cvar_t developer = {0, "developer","0", "prints additional debugging messages and information (recommended for modders and level designers)"};
cl.realframetime = max(cl_timer, clframetime);
}
}
- else if (vid_activewindow)
- clframetime = cl.realframetime = max(cl_timer, 1.0 / max(5.0f, cl_maxfps.value));
+ else if (vid_activewindow && cl_maxfps.value >= 1)
+ clframetime = cl.realframetime = max(cl_timer, 1.0 / cl_maxfps.value);
+ else if (!vid_activewindow && cl_maxidlefps.value >= 1)
+ clframetime = cl.realframetime = max(cl_timer, 1.0 / cl_maxidlefps.value);
else
- clframetime = cl.realframetime = max(cl_timer, 1.0 / max(5.0f, cl_maxidlefps.value));
+ clframetime = cl.realframetime = cl_timer;
// apply slowmo scaling
clframetime *= cl.movevars_timescale;