mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(WIN32) don't reopen the stdout/stderr streams or close the console when
attaching an existing one.
This commit is contained in:
parent
a1858d8f6b
commit
7d70fb3f4a
@ -328,18 +328,21 @@ static void frontend_win32_attach_console(void)
|
||||
{
|
||||
AllocConsole();
|
||||
AttachConsole( GetCurrentProcessId()) ;
|
||||
freopen( "CON", "w", stdout );
|
||||
freopen( "CON", "w", stderr );
|
||||
}
|
||||
freopen( "CON", "w", stdout );
|
||||
freopen( "CON", "w", stderr );
|
||||
#endif
|
||||
}
|
||||
|
||||
static void frontend_win32_detach_console(void)
|
||||
{
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
HWND wnd = GetConsoleWindow();
|
||||
FreeConsole();
|
||||
PostMessage(wnd, WM_CLOSE, 0, 0);
|
||||
if (!AttachConsole(ATTACH_PARENT_PROCESS))
|
||||
{
|
||||
HWND wnd = GetConsoleWindow();
|
||||
FreeConsole();
|
||||
PostMessage(wnd, WM_CLOSE, 0, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user