Merge pull request #1444 from aquanull/patch-4

Fix showing/hiding Log Console on Windows
This commit is contained in:
Henrik Rydgård committed 2013-04-21 12:06:20 -07:00
commit 5bced16bd7
1 file changed
+3 -1
+3 -1
View File
@@ -79,8 +79,10 @@ void ConsoleListener::Open(bool Hidden, int Width, int Height, const char *Title
{
// Open the console window and create the window handle for GetStdHandle()
AllocConsole();
HWND hConWnd = GetConsoleWindow();
ShowWindow(hConWnd, SW_SHOWDEFAULT);
// Hide
if (Hidden) ShowWindow(GetConsoleWindow(), SW_HIDE);
if (Hidden) ShowWindow(hConWnd, SW_HIDE);
// Save the window handle that AllocConsole() created
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
// Set the console window title