mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
Fix win32 console partial print being overwritten
This commit is contained in:
parent
20cd170993
commit
2d6b68edd8
1 changed files with 7 additions and 0 deletions
|
@ -42,6 +42,7 @@ static int qconsole_history_oldest = 0;
|
|||
// current edit buffer
|
||||
static char qconsole_line[ MAX_EDIT_LINE ];
|
||||
static int qconsole_linelen = 0;
|
||||
static qboolean qconsole_drawinput = qtrue;
|
||||
|
||||
static HANDLE qconsole_hout;
|
||||
static HANDLE qconsole_hin;
|
||||
|
@ -181,6 +182,10 @@ static void CON_Show( void )
|
|||
|
||||
GetConsoleScreenBufferInfo( qconsole_hout, &binfo );
|
||||
|
||||
// if we're in the middle of printf, don't bother writing the buffer
|
||||
if( !qconsole_drawinput )
|
||||
return;
|
||||
|
||||
writeArea.Left = 0;
|
||||
writeArea.Top = binfo.dwCursorPosition.Y;
|
||||
writeArea.Bottom = binfo.dwCursorPosition.Y;
|
||||
|
@ -424,6 +429,8 @@ void CON_WindowsColorPrint( const char *msg )
|
|||
|
||||
while( *msg )
|
||||
{
|
||||
qconsole_drawinput = ( *msg == '\n' );
|
||||
|
||||
if( Q_IsColorString( msg ) || *msg == '\n' )
|
||||
{
|
||||
// First empty the buffer
|
||||
|
|
Loading…
Reference in a new issue