Rename gl_maxfps to vid_maxfps.

This commit is contained in:
Yamagi Burmeister 2018-01-09 09:47:03 +01:00
parent 78ff99dd86
commit e6b0e19cff
3 changed files with 14 additions and 13 deletions

View File

@ -55,7 +55,8 @@ replacement_t replacements[] = {
{"gl_dynamic", "gl1_dynamic"}, {"gl_dynamic", "gl1_dynamic"},
{"gl_farsee", "r_farsee"}, {"gl_farsee", "r_farsee"},
{"gl_flashblend", "gl1_flashblend"}, {"gl_flashblend", "gl1_flashblend"},
{"gl_lockpvs", "r_lockpvs"} {"gl_lockpvs", "r_lockpvs"},
{"gl_maxfps", "vid_maxfps"}
}; };

View File

@ -43,7 +43,7 @@ extern zhead_t z_chain;
FILE *log_stats_file; FILE *log_stats_file;
cvar_t *cl_async; cvar_t *cl_async;
cvar_t *cl_timedemo; cvar_t *cl_timedemo;
cvar_t *gl_maxfps; cvar_t *vid_maxfps;
cvar_t *host_speeds; cvar_t *host_speeds;
cvar_t *log_stats; cvar_t *log_stats;
cvar_t *showtrace; cvar_t *showtrace;
@ -136,7 +136,7 @@ Qcommon_Init(int argc, char **argv)
cl_async = Cvar_Get("cl_async", "1", CVAR_ARCHIVE); cl_async = Cvar_Get("cl_async", "1", CVAR_ARCHIVE);
cl_timedemo = Cvar_Get("timedemo", "0", 0); cl_timedemo = Cvar_Get("timedemo", "0", 0);
dedicated = Cvar_Get("dedicated", "0", CVAR_NOSET); dedicated = Cvar_Get("dedicated", "0", CVAR_NOSET);
gl_maxfps = Cvar_Get("gl_maxfps", "95", CVAR_ARCHIVE); vid_maxfps = Cvar_Get("vid_maxfps", "95", CVAR_ARCHIVE);
host_speeds = Cvar_Get("host_speeds", "0", 0); host_speeds = Cvar_Get("host_speeds", "0", 0);
log_stats = Cvar_Get("log_stats", "0", 0); log_stats = Cvar_Get("log_stats", "0", 0);
showtrace = Cvar_Get("showtrace", "0", 0); showtrace = Cvar_Get("showtrace", "0", 0);
@ -293,11 +293,11 @@ Qcommon_Frame(int msec)
c_pointcontents = 0; c_pointcontents = 0;
} }
// gl_maxfps > 1000 breaks things, and so does <= 0 // vid_maxfps > 1000 breaks things, and so does <= 0
// so cap to 1000 and treat <= 0 as "as fast as possible", which is 1000 // so cap to 1000 and treat <= 0 as "as fast as possible", which is 1000
if (gl_maxfps->value > 1000 || gl_maxfps->value < 1) if (vid_maxfps->value > 1000 || vid_maxfps->value < 1)
{ {
Cvar_SetValue("gl_maxfps", 1000); Cvar_SetValue("vid_maxfps", 1000);
} }
if(cl_maxfps->value > 250) if(cl_maxfps->value > 250)
@ -319,14 +319,14 @@ Qcommon_Frame(int msec)
{ {
rfps = GLimp_GetRefreshRate(); rfps = GLimp_GetRefreshRate();
if (rfps > gl_maxfps->value) if (rfps > vid_maxfps->value)
{ {
rfps = (int)gl_maxfps->value; rfps = (int)vid_maxfps->value;
} }
} }
else else
{ {
rfps = (int)gl_maxfps->value; rfps = (int)vid_maxfps->value;
} }
pfps = (cl_maxfps->value > rfps) ? rfps : cl_maxfps->value; pfps = (cl_maxfps->value > rfps) ? rfps : cl_maxfps->value;

View File

@ -21,10 +21,10 @@ General:
This makes it possible to renderer as many frames as desired without This makes it possible to renderer as many frames as desired without
any physics and movement problems. The client framerate is controlled any physics and movement problems. The client framerate is controlled
by *cl_maxfps*, set to `60` by defaut. The renderer framerate is by *cl_maxfps*, set to `60` by defaut. The renderer framerate is
controlled by *gl_maxfps*. There are two constraints: *gl_maxfps* must controlled by *vid_maxfps*. There are two constraints: *vid_maxfps* must
be the same or greater than *cl_maxfps*. In case that the vsync is be the same or greater than *cl_maxfps*. In case that the vsync is
active, *gl_maxfps* must not be lower than the display refresh rate. active, *vid_maxfps* must not be lower than the display refresh rate.
If *cl_async* is set to `0` *gl_maxfps* is the same as *cl_maxfps*, use If *cl_async* is set to `0` *vid_maxfps* is the same as *cl_maxfps*, use
*cl_maxfps* to set the framerate. *cl_maxfps* to set the framerate.
* **cl_showfps**: Shows the framecounter. The shown value is rather * **cl_showfps**: Shows the framecounter. The shown value is rather
@ -118,7 +118,7 @@ Graphics (all renderers):
* **r_farsee**: Normally Quake II renders only up to 4096 units. If set * **r_farsee**: Normally Quake II renders only up to 4096 units. If set
to `1` the limit is increased to 8192 units. to `1` the limit is increased to 8192 units.
* **gl_maxfps**: The maximum framerate, if `cl_async` is `1`. Otherwise * **vid_maxfps**: The maximum framerate, if `cl_async` is `1`. Otherwise
`cl_maxfps` is used as maximum framerate. See `cl_async` description `cl_maxfps` is used as maximum framerate. See `cl_async` description
above for more information. above for more information.
*Note* that vsync (`gl_swapinterval`) also restricts the framerate to *Note* that vsync (`gl_swapinterval`) also restricts the framerate to