mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-12 23:44:21 +00:00
Remove CON_FlushIn function and where STDIN needs flushing, use tcflush POSIX function
This commit is contained in:
parent
b48d902672
commit
af6b1f8edf
1 changed files with 3 additions and 17 deletions
|
@ -73,20 +73,6 @@ static int hist_current = -1, hist_count = 0;
|
||||||
#define TTY_CONSOLE_PROMPT "]"
|
#define TTY_CONSOLE_PROMPT "]"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
==================
|
|
||||||
CON_FlushIn
|
|
||||||
|
|
||||||
Flush stdin, I suspect some terminals are sending a LOT of shit
|
|
||||||
FIXME relevant?
|
|
||||||
==================
|
|
||||||
*/
|
|
||||||
static void CON_FlushIn( void )
|
|
||||||
{
|
|
||||||
char key;
|
|
||||||
while (read(STDIN_FILENO, &key, 1)!=-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==================
|
==================
|
||||||
CON_Back
|
CON_Back
|
||||||
|
@ -441,7 +427,7 @@ char *CON_Input( void )
|
||||||
TTY_con = *history;
|
TTY_con = *history;
|
||||||
CON_Show();
|
CON_Show();
|
||||||
}
|
}
|
||||||
CON_FlushIn();
|
tcflush(STDIN_FILENO, TCIFLUSH);
|
||||||
return NULL;
|
return NULL;
|
||||||
break;
|
break;
|
||||||
case 'B':
|
case 'B':
|
||||||
|
@ -455,7 +441,7 @@ char *CON_Input( void )
|
||||||
Field_Clear(&TTY_con);
|
Field_Clear(&TTY_con);
|
||||||
}
|
}
|
||||||
CON_Show();
|
CON_Show();
|
||||||
CON_FlushIn();
|
tcflush(STDIN_FILENO, TCIFLUSH);
|
||||||
return NULL;
|
return NULL;
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
|
@ -467,7 +453,7 @@ char *CON_Input( void )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Com_DPrintf("droping ISCTL sequence: %d, TTY_erase: %d\n", key, TTY_erase);
|
Com_DPrintf("droping ISCTL sequence: %d, TTY_erase: %d\n", key, TTY_erase);
|
||||||
CON_FlushIn();
|
tcflush(STDIN_FILENO, TCIFLUSH);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (TTY_con.cursor >= sizeof(text) - 1)
|
if (TTY_con.cursor >= sizeof(text) - 1)
|
||||||
|
|
Loading…
Reference in a new issue