static HANDLE heventParent;
static HANDLE heventChild;
-volatile int sys_checksum;
-
-
-/*
-================
-Sys_PageIn
-================
-*/
-/*
-void Sys_PageIn (void *ptr, int size)
-{
- byte *x;
- int m, n;
-
-// touch all the memory to make sure it's there. The 16-page skip is to
-// keep Win 95 from thinking we're trying to page ourselves in (we are
-// doing that, of course, but there's no reason we shouldn't)
- x = (byte *)ptr;
-
- for (n=0 ; n<4 ; n++)
- {
- for (m=0 ; m<(size - 16 * 0x1000) ; m += 4)
- {
- sys_checksum += *(int *)&x[m];
- sys_checksum += *(int *)&x[m + 16 * 0x1000];
- }
- }
-}
-*/
-
-
/*
===============================================================================
*lpCmdLine = 0;
lpCmdLine++;
}
-
+
}
}
host_parms.argc = com_argc;
host_parms.argv = com_argv;
- Sys_Shared_Init();
-
-// take the greater of all the available memory or half the total memory,
-// but at least 8 Mb and no more than 16 Mb, unless they explicitly
-// request otherwise
- /*
- host_parms.memsize = lpBuffer.dwAvailPhys;
-
- if (host_parms.memsize < MINIMUM_WIN_MEMORY)
- host_parms.memsize = MINIMUM_WIN_MEMORY;
-
- if (host_parms.memsize < (lpBuffer.dwTotalPhys >> 1))
- host_parms.memsize = lpBuffer.dwTotalPhys >> 1;
-
- if (host_parms.memsize > MAXIMUM_WIN_MEMORY)
- host_parms.memsize = MAXIMUM_WIN_MEMORY;
- */
-
-// Sys_PageIn (parms.membase, parms.memsize);
+ Sys_Shared_EarlyInit();
tevent = CreateEvent(NULL, false, false, NULL);
if (t < com_argc)
hFile = (HANDLE)atoi (com_argv[t+1]);
}
-
+
if ((t = COM_CheckParm ("-HPARENT")) > 0)
{
if (t < com_argc)
heventParent = (HANDLE)atoi (com_argv[t+1]);
}
-
+
if ((t = COM_CheckParm ("-HCHILD")) > 0)
{
if (t < com_argc)
timeBeginPeriod (1);
#endif
- Sys_Printf ("Host_Init\n");
Host_Init ();
+ Sys_Shared_LateInit();
+
oldtime = Sys_DoubleTime ();
/* main window message loop */