2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 12:27:43 +00:00

Editor: Only create Win32 console & redirect logging if not attached

This commit is contained in:
2020-04-18 03:02:44 -04:00
parent 2b62bb9577
commit 7f15390d4f
2 changed files with 5 additions and 7 deletions

View File

@@ -207,7 +207,8 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE, LPWSTR lpCmdLine, int) {
for (int i = 0; i < argc; ++i)
booArgv[i + 1] = argv[i];
if (IsClientLoggingEnabled(argc + 1, booArgv))
const DWORD outType = GetFileType(GetStdHandle(STD_OUTPUT_HANDLE));
if (IsClientLoggingEnabled(argc + 1, booArgv) && outType == FILE_TYPE_UNKNOWN)
logvisor::CreateWin32Console();
return wmain(argc + 1, booArgv);
}