From fc25a74a0380d183127a1db910d5416898311ffa Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 28 May 2016 20:11:19 +0200 Subject: [PATCH] - fixed: In case of a crash the buffered console output was not dumped to the rich edit control so it never got into the crash log. --- src/win32/i_crash.cpp | 2 ++ src/win32/i_main.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/win32/i_crash.cpp b/src/win32/i_crash.cpp index 4603fb4f98..d4804ec0e9 100644 --- a/src/win32/i_crash.cpp +++ b/src/win32/i_crash.cpp @@ -284,6 +284,7 @@ struct MiniDumpThreadData // EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- // PUBLIC FUNCTION PROTOTYPES ---------------------------------------------- +void I_FlushBufferedConsoleStuff(); // PRIVATE FUNCTION PROTOTYPES --------------------------------------------- @@ -679,6 +680,7 @@ void CreateCrashLog (char *custominfo, DWORD customsize, HWND richlog) } if (richlog != NULL) { + I_FlushBufferedConsoleStuff(); AddFile (WriteLogFile(richlog), "log.rtf"); } CloseHandle (DbgProcess); diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index 7a804dd81f..52e78c3bc0 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -681,7 +681,6 @@ void RestoreConView() ConWindowHidden = false; ShowWindow (GameTitleWindow, SW_SHOW); I_ShutdownInput (); // Make sure the mouse pointer is available. - I_FlushBufferedConsoleStuff(); // Make sure the progress bar isn't visible. if (StartScreen != NULL) { @@ -1029,6 +1028,7 @@ void DoMain (HINSTANCE hInstance) { I_ShutdownGraphics (); RestoreConView (); + I_FlushBufferedConsoleStuff(); if (error.GetMessage ()) { if (!batchrun)