diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 8f44049c1..cd58028d1 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,7 @@ +February 3, 2009 +- Added a fflush call after the logfile write in I_FatalError so that the + error text is visible in the file while the error dialog is displayed. + January 18, 2009 - February 3, 2009 (Changes by Graf Zahl) - moved all code related to global ACS variables to p_acs.cpp where it belongs. - fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew. diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 540d6554e..680890b99 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -254,7 +254,10 @@ void STACK_ARGS I_FatalError (const char *error, ...) // Record error to log (if logging) if (Logfile) + { fprintf (Logfile, "\n**** DIED WITH FATAL ERROR:\n%s\n", errortext); + fflush (Logfile); + } // throw CFatalError (errortext); fprintf (stderr, "%s\n", errortext); exit (-1); diff --git a/src/win32/i_system.cpp b/src/win32/i_system.cpp index 9da20744c..edb92f9a8 100644 --- a/src/win32/i_system.cpp +++ b/src/win32/i_system.cpp @@ -474,7 +474,10 @@ void STACK_ARGS I_FatalError (const char *error, ...) // Record error to log (if logging) if (Logfile) + { fprintf (Logfile, "\n**** DIED WITH FATAL ERROR:\n%s\n", errortext); + fflush (Logfile); + } throw CFatalError (errortext); }