HANDLE hinput, houtput;
+#ifdef QHOST
static HANDLE tevent;
static HANDLE hFile;
static HANDLE heventParent;
static HANDLE heventChild;
+#endif
/*
void Sys_Shutdown (void)
{
+#ifdef QHOST
if (tevent)
CloseHandle (tevent);
+#endif
if (cls.state == ca_dedicated)
FreeConsole ();
+#ifdef QHOST
// shut down QHOST hooks if necessary
DeinitConProc ();
+#endif
}
void Sys_PrintToTerminal(const char *text)
if (newtime - oldtime < -0.01)
Con_Printf("Sys_DoubleTime: time stepped backwards (went from %f to %f, difference %f)\n", oldtime, newtime, newtime - oldtime);
}
+ else if (newtime > oldtime + 1800)
+ {
+ Con_Printf("Sys_DoubleTime: time stepped forward (went from %f to %f, difference %f)\n", oldtime, newtime, newtime - oldtime);
+ }
else
curtime += newtime - oldtime;
oldtime = newtime;
break;
default:
- if (ch >= ' ')
+ if (ch >= (int) (unsigned char) ' ')
{
WriteFile(houtput, &ch, 1, &dummy, NULL);
text[len] = ch;
if ((hClipboardData = GetClipboardData (CF_TEXT)) != 0)
{
- if ((cliptext = GlobalLock (hClipboardData)) != 0)
+ if ((cliptext = (char *)GlobalLock (hClipboardData)) != 0)
{
size_t allocsize;
allocsize = GlobalSize (hClipboardData) + 1;
- data = Z_Malloc (allocsize);
+ data = (char *)Z_Malloc (allocsize);
strlcpy (data, cliptext, allocsize);
GlobalUnlock (hClipboardData);
}
void Sys_InitConsole (void)
{
+#ifdef QHOST
int t;
// initialize the windows dedicated server console if needed
if (!tevent)
Sys_Error ("Couldn't create event");
+#endif
houtput = GetStdHandle (STD_OUTPUT_HANDLE);
hinput = GetStdHandle (STD_INPUT_HANDLE);
Sys_Error ("Couldn't create dedicated server console");
+#ifdef QHOST
#ifdef _WIN64
#define atoi _atoi64
#endif
}
InitConProc (hFile, heventParent, heventChild);
+#endif
}
// because sound is off until we become active
// FIXME: this tokenizer is rather redundent, call a more general one
while (*lpCmdLine && (com_argc < MAX_NUM_ARGVS))
{
- while (*lpCmdLine && *lpCmdLine <= ' ')
+ while (*lpCmdLine && ISWHITESPACE(*lpCmdLine))
lpCmdLine++;
if (!*lpCmdLine)
// unquoted word
argv[com_argc] = lpCmdLine;
com_argc++;
- while (*lpCmdLine && *lpCmdLine > ' ')
+ while (*lpCmdLine && !ISWHITESPACE(*lpCmdLine))
lpCmdLine++;
}
return true;
}
+#if 0
+// unused, this file is only used when building windows client and vid_wgl provides WinMain() instead
int main (int argc, const char* argv[])
{
MEMORYSTATUS lpBuffer;
return true;
}
+#endif
+