sys_usetimegettime is now initialized at a place where it shouldn't crash anymore...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 20 Aug 2002 02:50:38 +0000 (02:50 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 20 Aug 2002 02:50:38 +0000 (02:50 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2259 d7cf8633-e32d-0410-b094-e92efae38249

host.c
sys_shared.c
sys_win.c

diff --git a/host.c b/host.c
index 20d22b8..5d570be 100644 (file)
--- a/host.c
+++ b/host.c
@@ -817,7 +817,6 @@ void Host_Init (void)
                developer.value = 1;
        }
 
-       Memory_Init ();
        Cmd_Init ();
        Memory_Init_Commands();
        R_Modules_Init();
index 0753133..370752b 100644 (file)
@@ -106,6 +106,8 @@ char engineversion[128];
 
 void Sys_Shared_EarlyInit(void)
 {
+       Memory_Init ();
+
 #if defined(__linux__)
        sprintf (engineversion, "%s Linux %s", gamename, buildstring);
 #elif defined(WIN32)
index 1479e7c..1515655 100644 (file)
--- a/sys_win.c
+++ b/sys_win.c
@@ -484,8 +484,6 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
        if (hPrevInstance)
                return 0;
 
-       Cvar_RegisterVariable(&sys_usetimegettime);
-
        global_hInstance = hInstance;
        global_nCmdShow = nCmdShow;
 
@@ -536,6 +534,8 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
 
        Sys_Shared_EarlyInit();
 
+       Cvar_RegisterVariable(&sys_usetimegettime);
+
        tevent = CreateEvent(NULL, false, false, NULL);
 
        if (!tevent)