From 7fccfcafc99fe8a81bee1e2cc32e3e383d238dc2 Mon Sep 17 00:00:00 2001 From: tma Date: Fri, 30 Nov 2007 18:32:52 +0000 Subject: * Add con_log.c to log all console output * Add con_passive.c to cut down on #ifdef DEDICATED in sys_main.c * Add Sys_ErrorDialog to report ERR_FATALs to the user + On Windows use a MessageBox and offer to copy the console log to the clipboard + On everything else print to the terminal and save the console log as crashlog.txt git-svn-id: svn://svn.icculus.org/quake3/trunk@1222 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/sys/con_win32.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'code/sys/con_win32.c') diff --git a/code/sys/con_win32.c b/code/sys/con_win32.c index 23a5ae7..787c74f 100644 --- a/code/sys/con_win32.c +++ b/code/sys/con_win32.c @@ -130,21 +130,12 @@ static void CON_HistNext( void ) } -/* -================== -CON_Hide -================== -*/ -void CON_Hide( void ) -{ -} - /* ================== CON_Show ================== */ -void CON_Show( void ) +static void CON_Show( void ) { CONSOLE_SCREEN_BUFFER_INFO binfo; COORD writeSize = { MAX_EDIT_LINE, 1 }; @@ -155,7 +146,7 @@ void CON_Show( void ) GetConsoleScreenBufferInfo( qconsole_hout, &binfo ); - // if we' re in the middle of printf, don't bother writing the buffer + // if we're in the middle of printf, don't bother writing the buffer if( binfo.dwCursorPosition.X != 0 ) return; @@ -249,10 +240,10 @@ void CON_Init( void ) /* ================== -CON_ConsoleInput +CON_Input ================== */ -char *CON_ConsoleInput( void ) +char *CON_Input( void ) { INPUT_RECORD buff[ MAX_EDIT_LINE ]; DWORD count = 0, events = 0; @@ -353,3 +344,15 @@ char *CON_ConsoleInput( void ) return qconsole_line; } + +/* +================== +CON_Print +================== +*/ +void CON_Print( const char *msg ) +{ + fputs( msg, stderr ); + + CON_Show( ); +} -- cgit v1.2.3