Merge pull request #4650 from fr500/master

Better console behavior
This commit is contained in:
Andrés 2017-02-15 23:59:51 -05:00 committed by GitHub
commit 8114ce70d2
2 changed files with 8 additions and 9 deletions

View File

@ -345,13 +345,12 @@ static void frontend_win32_attach_console(void)
{
#ifdef _WIN32
#ifdef _WIN32_WINNT_WINXP
if (!AttachConsole(ATTACH_PARENT_PROCESS))
{
AllocConsole();
AttachConsole( GetCurrentProcessId()) ;
freopen( "CON", "w", stdout );
freopen( "CON", "w", stderr );
}
AttachConsole(ATTACH_PARENT_PROCESS);
AllocConsole();
AttachConsole( GetCurrentProcessId()) ;
freopen( "CON", "w", stdout );
freopen( "CON", "w", stderr );
#endif
#endif
}

View File

@ -56,7 +56,7 @@ void verbosity_enable(void)
{
main_verbosity = true;
#ifdef RARCH_INTERNAL
if (!log_file)
if (!log_file_initialized)
frontend_driver_attach_console();
#endif
}
@ -65,7 +65,7 @@ void verbosity_disable(void)
{
main_verbosity = false;
#ifdef RARCH_INTERNAL
if (!log_file)
if (!log_file_initialized)
frontend_driver_detach_console();
#endif
}