Only flush buffer if we are reading from the console.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3635
This commit is contained in:
parent
e7b2ddbedf
commit
b234560075
1 changed files with 7 additions and 4 deletions
|
@ -227,10 +227,13 @@ static Bitu DOS_21Handler(void) {
|
|||
break;
|
||||
case 0x0c: /* Flush Buffer and read STDIN call */
|
||||
{
|
||||
/* flush STDIN-buffer */
|
||||
Bit8u c;Bit16u n;
|
||||
while (DOS_GetSTDINStatus()) {
|
||||
n=1; DOS_ReadFile(STDIN,&c,&n);
|
||||
/* flush buffer if STDIN is CON */
|
||||
Bit8u handle=RealHandle(STDIN);
|
||||
if (handle!=0xFF && Files[handle] && Files[handle]->IsName("CON")) {
|
||||
Bit8u c;Bit16u n;
|
||||
while (DOS_GetSTDINStatus()) {
|
||||
n=1; DOS_ReadFile(STDIN,&c,&n);
|
||||
}
|
||||
}
|
||||
switch (reg_al) {
|
||||
case 0x1:
|
||||
|
|
Loading…
Add table
Reference in a new issue