diff --git a/code/sys/con_win32.c b/code/sys/con_win32.c index 037e9f76..9f2f98aa 100644 --- a/code/sys/con_win32.c +++ b/code/sys/con_win32.c @@ -221,6 +221,25 @@ static void CON_Show( void ) } } +/* +================== +CON_Hide +================== +*/ +static void CON_Hide( void ) +{ + int realLen; + + realLen = qconsole_linelen; + + // remove input line from console output buffer + qconsole_linelen = 0; + CON_Show( ); + + qconsole_linelen = realLen; +} + + /* ================== CON_Shutdown @@ -228,6 +247,7 @@ CON_Shutdown */ void CON_Shutdown( void ) { + CON_Hide( ); SetConsoleMode( qconsole_hin, qconsole_orig_mode ); SetConsoleCursorInfo( qconsole_hout, &qconsole_orig_cursorinfo ); SetConsoleTextAttribute( qconsole_hout, qconsole_attrib ); @@ -458,6 +478,8 @@ CON_Print */ void CON_Print( const char *msg ) { + CON_Hide( ); + CON_WindowsColorPrint( msg ); CON_Show( );