summaryrefslogtreecommitdiff
path: root/src/sys/con_win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/con_win32.c')
-rw-r--r--src/sys/con_win32.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/sys/con_win32.c b/src/sys/con_win32.c
index 37621210..0306c6bf 100644
--- a/src/sys/con_win32.c
+++ b/src/sys/con_win32.c
@@ -175,16 +175,13 @@ static void CON_Show( void )
COORD writeSize = { MAX_EDIT_LINE, 1 };
COORD writePos = { 0, 0 };
SMALL_RECT writeArea = { 0, 0, 0, 0 };
+ COORD cursorPos;
int i;
CHAR_INFO line[ MAX_EDIT_LINE ];
WORD attrib;
GetConsoleScreenBufferInfo( qconsole_hout, &binfo );
- // if we're in the middle of printf, don't bother writing the buffer
- if( binfo.dwCursorPosition.X != 0 )
- return;
-
writeArea.Left = 0;
writeArea.Top = binfo.dwCursorPosition.Y;
writeArea.Bottom = binfo.dwCursorPosition.Y;
@@ -220,6 +217,12 @@ static void CON_Show( void )
WriteConsoleOutput( qconsole_hout, line, writeSize,
writePos, &writeArea );
}
+
+ // set curor position
+ cursorPos.Y = binfo.dwCursorPosition.Y;
+ cursorPos.X = qconsole_linelen > binfo.srWindow.Right ? binfo.srWindow.Right : qconsole_linelen;
+
+ SetConsoleCursorPosition( qconsole_hout, cursorPos );
}
/*
@@ -263,7 +266,6 @@ CON_Init
*/
void CON_Init( void )
{
- CONSOLE_CURSOR_INFO curs;
CONSOLE_SCREEN_BUFFER_INFO info;
int i;
@@ -292,12 +294,6 @@ void CON_Init( void )
SetConsoleTitle("Tremulous Dedicated Server Console");
- // make cursor invisible
- GetConsoleCursorInfo( qconsole_hout, &qconsole_orig_cursorinfo );
- curs.dwSize = 1;
- curs.bVisible = FALSE;
- SetConsoleCursorInfo( qconsole_hout, &curs );
-
// initialize history
for( i = 0; i < QCONSOLE_HISTORY; i++ )
qconsole_history[ i ][ 0 ] = '\0';