fully implement dos subfunction 0x0c, fix CON GetInformation (Kippesoep; sf patch #1691918, fixes Wing Commander 3 exit dialog)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2840
This commit is contained in:
parent
17c683f8ad
commit
15ea05cff9
2 changed files with 9 additions and 10 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dev_con.h,v 1.28 2007-01-11 18:08:54 c2woody Exp $ */
|
||||
/* $Id: dev_con.h,v 1.29 2007-04-16 12:23:23 c2woody Exp $ */
|
||||
|
||||
#include "dos_inc.h"
|
||||
#include "../ints/int10.h"
|
||||
|
@ -370,7 +370,7 @@ Bit16u device_CON::GetInformation(void) {
|
|||
Bit16u tail=mem_readw(BIOS_KEYBOARD_BUFFER_TAIL);
|
||||
|
||||
if ((head==tail) && !readcache) return 0x80D3; /* No Key Available */
|
||||
if (real_readw(0x40,head)) return 0x8093; /* Key Available */
|
||||
if (readcache || real_readw(0x40,head)) return 0x8093; /* Key Available */
|
||||
|
||||
/* remove the zero from keyboard buffer */
|
||||
Bit16u start=mem_readw(BIOS_KEYBOARD_BUFFER_START);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos.cpp,v 1.99 2007-01-13 08:35:49 qbix79 Exp $ */
|
||||
/* $Id: dos.cpp,v 1.100 2007-04-16 12:23:23 c2woody Exp $ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -191,14 +191,12 @@ 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);
|
||||
}
|
||||
switch (reg_al) {
|
||||
case 0x0:
|
||||
/* flush STDIN-buffer */
|
||||
Bit8u c;Bit16u n;
|
||||
while (DOS_GetSTDINStatus()) {
|
||||
n=1; DOS_ReadFile(STDIN,&c,&n);
|
||||
}
|
||||
break;
|
||||
case 0x1:
|
||||
case 0x6:
|
||||
case 0x7:
|
||||
|
@ -213,6 +211,7 @@ static Bitu DOS_21Handler(void) {
|
|||
break;
|
||||
default:
|
||||
// LOG_ERROR("DOS:0C:Illegal Flush STDIN Buffer call %d",reg_al);
|
||||
reg_al=0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue