mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
(WIN32) Skip console attach when logging to file (#14163)
This commit is contained in:
parent
05fb6fd9a3
commit
b44ad6f890
@ -699,21 +699,23 @@ static void frontend_win32_attach_console(void)
|
||||
bool need_stderr = (GetFileType(GetStdHandle(STD_ERROR_HANDLE))
|
||||
== FILE_TYPE_UNKNOWN);
|
||||
|
||||
if (config_get_ptr()->bools.log_to_file)
|
||||
return;
|
||||
|
||||
if (need_stdout || need_stderr)
|
||||
{
|
||||
if (!AttachConsole( ATTACH_PARENT_PROCESS))
|
||||
if (!AttachConsole(ATTACH_PARENT_PROCESS))
|
||||
AllocConsole();
|
||||
|
||||
SetConsoleTitle("Log Console");
|
||||
|
||||
if (need_stdout)
|
||||
freopen( "CONOUT$", "w", stdout );
|
||||
freopen("CONOUT$", "w", stdout);
|
||||
if (need_stderr)
|
||||
freopen( "CONOUT$", "w", stderr );
|
||||
freopen("CONOUT$", "w", stderr);
|
||||
|
||||
console_needs_free = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user