1
0
Fork 0

Improve behavior when reaching the end of the buffer. (thanks ripsaw)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3761
This commit is contained in:
Peter Veenstra 2011-11-23 12:18:58 +00:00
parent f51d4e5b67
commit f7ad3ece4e

View file

@ -220,6 +220,7 @@ static Bitu DOS_21Handler(void) {
Bit8u free=mem_readb(data);
Bit8u read=0;Bit8u c;Bit16u n=1;
if (!free) break;
free--;
for(;;) {
DOS_ReadFile(STDIN,&c,&n);
if (c == 8) { // Backspace
@ -232,7 +233,7 @@ static Bitu DOS_21Handler(void) {
}
continue;
}
if (read >= free) { // Keyboard buffer full
if (read == free && c != 13) { // Keyboard buffer full
Bit8u bell = 7;
DOS_WriteFile(STDOUT, &bell, &n);
continue;