cvar_t sys_usetimegettime = {CVAR_SAVE, "sys_usetimegettime", "1"};
-// # of seconds to wait on Sys_Error running dedicated before exiting
-#define CONSOLE_ERROR_TIMEOUT 60.0
-// sleep time on pause or minimization
-#define PAUSE_SLEEP 50
-// sleep time when not focus
-#define NOT_FOCUS_SLEEP 20
-
-static qboolean sc_return_on_enter = false;
HANDLE hinput, houtput;
static HANDLE tevent;
===============================================================================
*/
-void SleepUntilInput (int time);
-
void Sys_Error (const char *error, ...)
{
va_list argptr;
len = 0;
return text;
}
- else if (sc_return_on_enter)
- {
- // special case to allow exiting from the error handler on Enter
- text[0] = '\r';
- len = 0;
- return text;
- }
break;
*/
-void SleepUntilInput (int time)
-{
- MsgWaitForMultipleObjects(1, &tevent, false, time, QS_ALLINPUT);
-}
-
-
/*
==================
WinMain
/* main window message loop */
while (1)
{
- if (cls.state != ca_dedicated)
- {
- // yield the CPU for a little while when paused, minimized, or not the focus
- if ((cl.paused && !vid_activewindow) || vid_hidden)
- {
- SleepUntilInput (PAUSE_SLEEP);
- scr_skipupdate = 1; // no point in bothering to draw
- }
- else if (!vid_activewindow)
- SleepUntilInput (NOT_FOCUS_SLEEP);
- }
-
framenewtime = Sys_DoubleTime ();
Host_Frame (framenewtime - frameoldtime);
frameoldtime = framenewtime;
{NULL, NULL}
};
-qboolean scr_skipupdate;
-
static DEVMODE gdevmode;
static qboolean vid_initialized = false;
static qboolean vid_wassuspended = false;
qwglSwapIntervalEXT (old_vsync);
}
- if (r_render.integer && !scr_skipupdate)
+ if (r_render.integer && !vid_hidden)
{
if (r_speeds.integer || gl_finish.integer)
qglFinish();
while (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE))
{
- // we always update if there are any event, even if we're paused
- scr_skipupdate = 0;
-
if (!GetMessage (&msg, NULL, 0, 0))
Sys_Quit ();