Hide the console window before freeing so if the console is attachted to another process (currently occuring under Win10) it is at least hidden.

This commit is contained in:
Jules.A 2018-12-03 00:52:09 +08:00
parent c3614a7e95
commit 157717a61f
1 changed files with 1 additions and 0 deletions

View File

@ -208,6 +208,7 @@ void CloseConsole()
WritePrivateProfileInt("Console", "PosY", pos.top, IniName);
WritePrivateProfileInt("Console", "Width", width, IniName);
WritePrivateProfileInt("Console", "Height", height, IniName);
ShowWindow(gConsoleWnd, SW_HIDE); // FreeConsole isn't killing the console process in Windows 10 so just hide the window for now.
}
FreeConsole();