Fix dedicated server build.

This commit is contained in:
Yamagi Burmeister 2017-09-06 15:53:44 +02:00
parent 465963a1a5
commit a3ce70d2e3

View file

@ -51,8 +51,10 @@ extern jmp_buf abortframe; /* an ERR_DROP occured, exit the entire frame */
extern zhead_t z_chain; extern zhead_t z_chain;
// Forward declarations // Forward declarations
#ifndef DEDICATED_ONLY
int GLimp_GetRefreshRate(void); int GLimp_GetRefreshRate(void);
qboolean R_IsVSyncActive(void); qboolean R_IsVSyncActive(void);
#endif
static byte chktbl[1024] = { static byte chktbl[1024] = {
0x84, 0x47, 0x51, 0xc1, 0x93, 0x22, 0x21, 0x24, 0x2f, 0x66, 0x60, 0x4d, 0xb0, 0x7c, 0xda, 0x84, 0x47, 0x51, 0xc1, 0x93, 0x22, 0x21, 0x24, 0x2f, 0x66, 0x60, 0x4d, 0xb0, 0x7c, 0xda,
@ -417,6 +419,7 @@ Qcommon_Frame(int msec)
// Calculate target packet- and renderframerate. // Calculate target packet- and renderframerate.
#ifndef DEDICATED_ONLY
if (R_IsVSyncActive()) if (R_IsVSyncActive())
{ {
rfps = GLimp_GetRefreshRate(); rfps = GLimp_GetRefreshRate();
@ -432,6 +435,10 @@ Qcommon_Frame(int msec)
} }
pfps = (cl_maxfps->value > rfps) ? rfps : cl_maxfps->value; pfps = (cl_maxfps->value > rfps) ? rfps : cl_maxfps->value;
#else
pfps = (int)cl_maxfps->value;
rfps = (int)gl_maxfps->value;
#endif
// Calculate timings. // Calculate timings.