From: divverent Date: Sat, 3 Dec 2011 12:21:12 +0000 (+0000) Subject: add cl_minfps_force cvar to run minfps code even during timedemo X-Git-Tag: xonotic-v0.6.0~102^2~26 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=58f182d498e8e6583c52a9a1c662462af1654d75;p=xonotic%2Fdarkplaces.git add cl_minfps_force cvar to run minfps code even during timedemo git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11593 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_screen.c b/cl_screen.c index 26a0d63a..6cdc3dd6 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -2208,6 +2208,7 @@ extern cvar_t cl_minfps_qualitymin; extern cvar_t cl_minfps_qualitymultiply; extern cvar_t cl_minfps_qualityhysteresis; extern cvar_t cl_minfps_qualitystepmax; +extern cvar_t cl_minfps_force; static double cl_updatescreen_quality = 1; void CL_UpdateScreen(void) { @@ -2220,7 +2221,7 @@ void CL_UpdateScreen(void) if(drawscreenstart) { drawscreendelta = Sys_DirtyTime() - drawscreenstart; - if (cl_minfps.value > 0 && !cls.timedemo && (!cls.capturevideo.active || cls.capturevideo.realtime) && drawscreendelta >= 0 && drawscreendelta < 60) + if (cl_minfps.value > 0 && (cl_minfps_force.integer || !(cls.timedemo || (cls.capturevideo.active && !cls.capturevideo.realtime))) && drawscreendelta >= 0 && drawscreendelta < 60) { // quality adjustment according to render time double actualframetime; diff --git a/host.c b/host.c index bd8334b6..39dbe221 100644 --- a/host.c +++ b/host.c @@ -72,6 +72,7 @@ cvar_t cl_minfps_qualitymin = {CVAR_SAVE, "cl_minfps_qualitymin", "0.25", "lowes cvar_t cl_minfps_qualitymultiply = {CVAR_SAVE, "cl_minfps_qualitymultiply", "0.2", "multiplier for quality changes in quality change per second render time (1 assumes linearity of quality and render time)"}; cvar_t cl_minfps_qualityhysteresis = {CVAR_SAVE, "cl_minfps_qualityhysteresis", "0.05", "reduce all quality increments by this to reduce flickering"}; cvar_t cl_minfps_qualitystepmax = {CVAR_SAVE, "cl_minfps_qualitystepmax", "0.1", "maximum quality change in a single frame"}; +cvar_t cl_minfps_force = {0, "cl_minfps_force", "0", "also apply quality reductions in timedemo/capturevideo"}; cvar_t cl_maxfps = {CVAR_SAVE, "cl_maxfps", "0", "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_maxfps_alwayssleep = {0, "cl_maxfps_alwayssleep","1", "gives up some processing time to other applications each frame, value in milliseconds, disabled if cl_maxfps is 0"}; 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"}; @@ -244,6 +245,7 @@ static void Host_InitLocal (void) Cvar_RegisterVariable (&cl_minfps_qualitystepmax); Cvar_RegisterVariable (&cl_minfps_qualityhysteresis); Cvar_RegisterVariable (&cl_minfps_qualitymultiply); + Cvar_RegisterVariable (&cl_minfps_force); Cvar_RegisterVariable (&cl_maxfps); Cvar_RegisterVariable (&cl_maxfps_alwayssleep); Cvar_RegisterVariable (&cl_maxidlefps);