diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 91ba96f51..1e3b97f50 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ D1X-Rebirth Changelog 20101126 -------- include/physfsx.h, main/inferno.c, misc/physfsx.c: Implemented PHYSFSX_checkSupportedArchiveTypes to check if essential archive types are supported. Print warnings if not and stop program if necessary. Also added PHYSFSX_listSearchPAthContent to print out search path contents (figures) each time the function is called. Doing this before main HOG inits as well after sucessfully adding archives. Made PHYSFSX_addArchiveContent a bit more verbose as well. +main/console.c, main/inferno.c: If -verbose or -debug is set, write gamelog.txt unbuffered for a higher chance to get messages there in case of a crash; Totally supress messages in stdout/err.txt on _WIN32 20101123 -------- diff --git a/main/console.c b/main/console.c index ebeaadccd..52d3450ae 100644 --- a/main/console.c +++ b/main/console.c @@ -209,7 +209,10 @@ void con_init(void) { memset(con_buffer,0,sizeof(con_buffer)); - gamelog_fp = PHYSFSX_openWriteBuffered("gamelog.txt"); + if (GameArg.DbgVerbose >= CON_VERBOSE) + gamelog_fp = PHYSFS_openWrite("gamelog.txt"); + else + gamelog_fp = PHYSFSX_openWriteBuffered("gamelog.txt"); atexit(con_close); } diff --git a/main/inferno.c b/main/inferno.c index 2d0a89165..8b95def9f 100644 --- a/main/inferno.c +++ b/main/inferno.c @@ -300,6 +300,10 @@ int main(int argc, char *argv[]) con_init(); // Initialise the console setbuf(stdout, NULL); // unbuffered output via printf +#ifdef _WIN32 + freopen( "CON", "w", stdout ); + freopen( "CON", "w", stderr ); +#endif if (GameArg.SysShowCmdHelp) { print_commandline_help(); @@ -358,11 +362,6 @@ int main(int argc, char *argv[]) arch_init(); -#ifdef _WIN32 - freopen( "CON", "w", stdout ); - freopen( "CON", "w", stderr ); -#endif - select_tmap(GameArg.DbgTexMap); #ifdef NETWORK