Make the time period between averaging the min and max values shown with r_showfps 2+ user configurable with r_showfpsperiod

git-svn-id: https://svn.eduke32.com/eduke32@7308 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-01-12 00:22:10 +00:00
parent 74d766d988
commit 5f141ed8d6
3 changed files with 3 additions and 2 deletions

View file

@ -199,7 +199,7 @@ typedef struct {
int32_t playerbest;
int32_t configversion, bgstretch;
int32_t configversion, bgstretch, frameperiod;
int32_t default_volume, default_skill;

View file

@ -1634,6 +1634,7 @@ int32_t registerosdcommands(void)
{ "r_camrefreshdelay", "minimum delay between security camera sprite updates, 120 = 1 second", (void *)&ud.camera_time, CVAR_INT, 1, 240 },
{ "r_drawweapon", "enable/disable weapon drawing", (void *)&ud.drawweapon, CVAR_INT, 0, 2 },
{ "r_showfps", "show the frame rate counter", (void *)&ud.showfps, CVAR_INT, 0, 3 },
{ "r_showfpsperiod", "time in seconds before averaging min and max stats for r_showfps 2+", (void *)&ud.frameperiod, CVAR_INT, 0, 5 },
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
{ "r_size", "change size of viewable area", (void *)&ud.screen_size, CVAR_INT|CVAR_FUNCPTR, 0, 64 },
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },

View file

@ -877,7 +877,7 @@ static void G_PrintFPS(void)
static int secondCounter;
if (++secondCounter == 1)
if (++secondCounter >= ud.frameperiod)
{
maxFPS = (lastFPS + maxFPS) * .5f;
minFPS = (lastFPS + minFPS) * .5f;