From c7c8b70b2239519376f5e349db1a701448ade295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Fri, 12 Dec 2014 19:44:45 -0500 Subject: [PATCH] Don't buffer the changes to the console colors. After a Console.Write/Writeln that uses colors a call to ConsoleColorScope::LeaveScope() is made to restore m_old_color. This restoration command stays buffered until a full line is printed. In the meantime any console message that happens will use the old coloring and if the program happens to crash the console would keep using the color of the last colored text that was printed. --- common/src/Utilities/Console.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/src/Utilities/Console.cpp b/common/src/Utilities/Console.cpp index ad0ec55578..3025591af4 100644 --- a/common/src/Utilities/Console.cpp +++ b/common/src/Utilities/Console.cpp @@ -168,6 +168,7 @@ static void __concall ConsoleStdout_DoSetColor( ConsoleColors color ) #ifdef __linux__ wxPrintf(L"\033[0m"); wxPrintf(GetLinuxConsoleColor(color)); + fflush(stdout); #endif }