]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
console logging (-condebug) now starts earlier in the startup process (just after...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 23 May 2003 07:38:25 +0000 (07:38 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 23 May 2003 07:38:25 +0000 (07:38 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3018 d7cf8633-e32d-0410-b094-e92efae38249

common.c
console.c
console.h

index 4d9c9d556f8bc4f11eaa976eb6e2e9010e562bc2..8987d7f3f4de81d6c39f13ec552def77cfadef17 100644 (file)
--- a/common.c
+++ b/common.c
@@ -767,6 +767,7 @@ void COM_Init (void)
        Mathlib_Init();
 
        FS_Init ();
+       Con_InitLogging();
        COM_CheckRegistered ();
 
        COM_InitGameType();
index 21148248e1ccaf21ec9cc676e164f70877ca4ff1..34ff0a488668358da636c290b88211bd62927d19 100644 (file)
--- a/console.c
+++ b/console.c
@@ -201,20 +201,13 @@ void Con_CheckResize (void)
 }
 
 
-/*
-================
-Con_Init
-================
-*/
-void Con_Init (void)
+void Con_InitLogging (void)
 {
 #define MAXGAMEDIRLEN 1000
        char temp[MAXGAMEDIRLEN+1];
        char *t2 = "/qconsole.log";
 
-       Cvar_RegisterVariable(&logfile);
        con_debuglog = COM_CheckParm("-condebug");
-
        if (con_debuglog)
        {
                if (strlen (fs_gamedir) < (MAXGAMEDIRLEN - strlen (t2)))
@@ -224,6 +217,16 @@ void Con_Init (void)
                }
                logfile.integer = 1;
        }
+}
+
+/*
+================
+Con_Init
+================
+*/
+void Con_Init (void)
+{
+       Cvar_RegisterVariable(&logfile);
 
        console_mempool = Mem_AllocPool("console");
        con_text = Mem_Alloc(console_mempool, CON_TEXTSIZE);
index 9042ac069b8d2b4768215eac0e1bf6e192136966..d6aec97ce54bfc3ad930d2f2fcd3764155108935 100644 (file)
--- a/console.h
+++ b/console.h
@@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 See the GNU General Public License for more details.
 
@@ -31,6 +31,7 @@ extern qbyte *con_chars;
 extern int con_notifylines;            // scan lines to clear for notify lines
 
 void Con_CheckResize (void);
+void Con_InitLogging (void);
 void Con_Init (void);
 void Con_DrawConsole (int lines);
 void Con_Print (const char *txt);