From 38538776b54e74b1d063f279c8a327ab8081d3f5 Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 11 Mar 2006 16:19:18 +0000 Subject: [PATCH] moved Log_Start call into SCR_BeginLoadingPlaque (which occurs as soon as a map or demo loads, or when config parsing is done) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6095 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_screen.c | 3 +++ console.c | 9 +++++---- host.c | 3 --- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cl_screen.c b/cl_screen.c index 74cfdc69..861f181d 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -488,6 +488,9 @@ SCR_BeginLoadingPlaque */ void SCR_BeginLoadingPlaque (void) { + // save console log up to this point to log_file if it was set by configs + Log_Start(); + Host_StartVideo(); S_StopAllSounds(); SCR_UpdateLoadingScreen(); diff --git a/console.c b/console.c index 5c798f56..9c92e816 100644 --- a/console.c +++ b/console.c @@ -153,10 +153,11 @@ void Log_Start (void) // Dump the contents of the log queue into the log file and free it if (logqueue != NULL) { - if (logfile != NULL && logq_ind != 0) - FS_Write (logfile, logqueue, logq_ind); - Mem_Free (logqueue); + unsigned char *temp = logqueue; logqueue = NULL; + if (logfile != NULL && logq_ind != 0) + FS_Write (logfile, temp, logq_ind); + Mem_Free (temp); logq_ind = 0; logq_size = 0; } @@ -392,7 +393,7 @@ void Con_Init (void) con_linewidth = 80; con_totallines = CON_TEXTSIZE / con_linewidth; - // Allocate a log queue + // Allocate a log queue, this will be freed after configs are parsed logq_size = MAX_INPUTLINE; logqueue = (unsigned char *)Mem_Alloc (tempmempool, logq_size); logq_ind = 0; diff --git a/host.c b/host.c index 3cf4f493..d9b4da4a 100644 --- a/host.c +++ b/host.c @@ -1030,9 +1030,6 @@ void Host_Init (void) Cbuf_Execute(); } - // save console log up to this point to log_file if it was set by configs - Log_Start(); - // put up the loading image so the user doesn't stare at a black screen... SCR_BeginLoadingPlaque(); -- 2.39.2