(WIN32) Skip console attach when logging to file (#14163)
This commit is contained in:
parent
05fb6fd9a3
commit
b44ad6f890
|
@ -699,6 +699,9 @@ static void frontend_win32_attach_console(void)
|
||||||
bool need_stderr = (GetFileType(GetStdHandle(STD_ERROR_HANDLE))
|
bool need_stderr = (GetFileType(GetStdHandle(STD_ERROR_HANDLE))
|
||||||
== FILE_TYPE_UNKNOWN);
|
== FILE_TYPE_UNKNOWN);
|
||||||
|
|
||||||
|
if (config_get_ptr()->bools.log_to_file)
|
||||||
|
return;
|
||||||
|
|
||||||
if (need_stdout || need_stderr)
|
if (need_stdout || need_stderr)
|
||||||
{
|
{
|
||||||
if (!AttachConsole(ATTACH_PARENT_PROCESS))
|
if (!AttachConsole(ATTACH_PARENT_PROCESS))
|
||||||
|
@ -713,7 +716,6 @@ static void frontend_win32_attach_console(void)
|
||||||
|
|
||||||
console_needs_free = true;
|
console_needs_free = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue