From 39d050b74881c624d2622e988de83f27b763684b Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Mon, 28 Aug 2006 01:10:46 +0000 Subject: [PATCH] More fixes for the FS_Shutdown change. Declare qconsole.log as closed before FS_Shutdown closes all files. --- code/qcommon/common.c | 3 +-- code/qcommon/files.c | 3 +++ code/qcommon/qcommon.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/qcommon/common.c b/code/qcommon/common.c index efb7851e..f3a23602 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -51,8 +51,7 @@ char *com_argv[MAX_NUM_ARGVS+1]; jmp_buf abortframe; // an ERR_DROP occured, exit the entire frame -FILE *debuglogfile; -static fileHandle_t logfile; +fileHandle_t logfile; fileHandle_t com_journalFile; // events are written here fileHandle_t com_journalDataFile; // config files are written here diff --git a/code/qcommon/files.c b/code/qcommon/files.c index 0d70db20..34120351 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -2719,6 +2719,9 @@ void FS_Shutdown( qboolean closemfp ) { searchpath_t *p, *next; int i; + // logfile will now get closed. + logfile = 0; + for(i = 0; i < MAX_FILE_HANDLES; i++) { if (fsh[i].handleFiles.file.o) { FS_FCloseFile(i); diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index 3c53ae0a..f4f1a69b 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -776,6 +776,7 @@ extern int com_frameMsec; extern qboolean com_errorEntered; +extern fileHandle_t logfile; extern fileHandle_t com_journalFile; extern fileHandle_t com_journalDataFile;