From 1af6da6fdd746babf4d1433256f7f796a70d7342 Mon Sep 17 00:00:00 2001 From: dhewg Date: Fri, 30 Dec 2011 01:36:53 +0100 Subject: [PATCH] Make the printf() family on Windows print to stdout SDL logs this into stdout.txt for us. --- neo/sys/win32/win_main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/neo/sys/win32/win_main.cpp b/neo/sys/win32/win_main.cpp index fa76f45a..7c6d126c 100644 --- a/neo/sys/win32/win_main.cpp +++ b/neo/sys/win32/win_main.cpp @@ -220,6 +220,8 @@ void Sys_Error( const char *error, ... ) { vsprintf( text, error, argptr ); va_end( argptr); + printf("%s", text); + Conbuf_AppendText( text ); Conbuf_AppendText( "\n" ); @@ -274,6 +276,8 @@ void Sys_Printf( const char *fmt, ... ) { va_end(argptr); msg[sizeof(msg)-1] = '\0'; + printf("%s", msg); + if ( win32.win_outputDebugString.GetBool() ) { OutputDebugString( msg ); } @@ -297,6 +301,8 @@ void Sys_DebugPrintf( const char *fmt, ... ) { msg[ sizeof(msg)-1 ] = '\0'; va_end( argptr ); + printf("%s", msg); + OutputDebugString( msg ); } @@ -311,6 +317,8 @@ void Sys_DebugVPrintf( const char *fmt, va_list arg ) { idStr::vsnPrintf( msg, MAXPRINTMSG-1, fmt, arg ); msg[ sizeof(msg)-1 ] = '\0'; + printf("%s", msg); + OutputDebugString( msg ); }