extern cvar_t cl_capturevideo;
extern cvar_t cl_capturevideo_demo_stop;
#endif
-int old_vsync = 0;
static void CL_FinishTimeDemo (void);
}
if (cl_message.cursize > cl_message.maxsize)
{
- CL_Disconnect(false, "Demo message (%i) > cl_message.maxsize (%i)", cl_message.cursize, cl_message.maxsize);
+ CL_DisconnectEx(false, "Demo message (%i) > cl_message.maxsize (%i)", cl_message.cursize, cl_message.maxsize);
cl_message.cursize = 0;
return;
}
}
else
{
- CL_Disconnect(false, NULL);
+ CL_Disconnect();
return;
}
}
}
if (cls.state == ca_connected)
- CL_Disconnect(false, NULL);
+ CL_Disconnect();
// write the forced cd track number, or -1
if (c == 4)
cls.demostarting = true;
// disconnect from server
- CL_Disconnect(false, NULL);
+ CL_Disconnect();
// update networking ports (this is mainly just needed at startup)
NetConn_UpdateSockets();
fpsmax = cls.td_onesecondmaxfps;
// LadyHavoc: timedemo now prints out 7 digits of fraction, and min/avg/max
Con_Printf("%i frames %5.7f seconds %5.7f fps, one-second fps min/avg/max: %.0f %.0f %.0f (%i seconds)\n", frames, time, totalfpsavg, fpsmin, fpsavg, fpsmax, cls.td_onesecondavgcount);
- Log_Printf("benchmark.log", "date %s | enginedate %s | demo %s | commandline %s | run %d | result %i frames %5.7f seconds %5.7f fps, one-second fps min/avg/max: %.0f %.0f %.0f (%i seconds)\n", Sys_TimeString("%Y-%m-%d %H:%M:%S"), buildstring, cls.demoname, cmdline.string, benchmark_runs + 1, frames, time, totalfpsavg, fpsmin, fpsavg, fpsmax, cls.td_onesecondavgcount);
+ Log_Printf("benchmark.log", "date %s | enginedate %s | demo %s | commandline %s | run %d | result %i frames %5.7f seconds %5.7f fps, one-second fps min/avg/max: %.0f %.0f %.0f (%i seconds)\n", Sys_TimeString("%Y-%m-%d %H:%M:%S"), engineversion, cls.demoname, cmdline.string, benchmark_runs + 1, frames, time, totalfpsavg, fpsmin, fpsavg, fpsmax, cls.td_onesecondavgcount);
if (Sys_CheckParm("-benchmark"))
{
++benchmark_runs;
else
host.state = host_shutdown;
}
+
+ // Might need to re-enable vsync
+ Cvar_Callback(&vid_vsync);
}
/*
cls.timedemo = host.restless = true;
cls.td_frames = -2; // skip the first frame
cls.demonum = -1; // stop demo loop
+
+ // Might need to disable vsync
+ Cvar_Callback(&vid_vsync);
}
/*
return;
if (cls.demonum == -1)
cls.demonum = 1;
- CL_Disconnect(false, NULL);
+ CL_Disconnect();
CL_NextDemo();
}
{
if (!cls.demoplayback)
return;
- CL_Disconnect(false, NULL);
+ CL_Disconnect();
}
// LadyHavoc: pausedemo command