]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - console.c
Add cvar snd_cdautopause: optional CD track pause during game pause
[xonotic/darkplaces.git] / console.c
index b0afdd4c6835fa5ccb741339f67a5042d93c0dfa..cd596418592a0b00fef50a234173c7b65a1bc8b5 100644 (file)
--- a/console.c
+++ b/console.c
@@ -524,14 +524,16 @@ Log_Close
 */
 void Log_Close (void)
 {
-       if (logfile == NULL)
-               return;
+       qfile_t* l = logfile;
 
-       FS_Print (logfile, Log_Timestamp ("Log stopped"));
-       FS_Print (logfile, "\n");
-       FS_Close (logfile);
+       if (l == NULL)
+               return;
 
+       FS_Print (l, Log_Timestamp ("Log stopped"));
+       FS_Print (l, "\n");
        logfile = NULL;
+       FS_Close (l);
+
        crt_log_file[0] = '\0';
 }
 
@@ -931,9 +933,7 @@ void Con_Init (void)
        Cmd_AddCommand(CF_SHARED, "condump", Con_ConDump_f, "output console history to a file (see also log_file)");
 
        con_initialized = true;
-       // initialize console window (only used by sys_win.c)
-       Sys_InitConsole();
-       
+
        Con_Print("Console initialized.\n");
 }