X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=console.c;h=cd596418592a0b00fef50a234173c7b65a1bc8b5;hb=refs%2Fmerge-requests%2F130%2Fhead;hp=b0afdd4c6835fa5ccb741339f67a5042d93c0dfa;hpb=b2a1a3ffa49a3f315f9f59aa011c5888ad4bea4b;p=xonotic%2Fdarkplaces.git diff --git a/console.c b/console.c index b0afdd4c..cd596418 100644 --- 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"); }