Fixed a few problems.

This commit is contained in:
Ove Kaaven 2000-07-31 20:58:31 +00:00 committed by Alexandre Julliard
parent 28bbdb777c
commit 6200a48b70
2 changed files with 9 additions and 3 deletions

View File

@ -398,7 +398,7 @@ void DOSVM_Wait( int read_pipe, HANDLE hObject )
int objc; int objc;
BOOL got_msg = FALSE; BOOL got_msg = FALSE;
objs[0]=GetStdHandle(STD_INPUT_HANDLE); objs[0]=lpDosTask->hConInput;
objs[1]=hObject; objs[1]=hObject;
objc=hObject?2:1; objc=hObject?2:1;
do { do {
@ -684,7 +684,7 @@ void DOSVM_QueueEvent( int irq, int priority, void (*relay)(LPDOSTASK,CONTEXT86*
/* callback event, perform it with dummy context */ /* callback event, perform it with dummy context */
CONTEXT86 context; CONTEXT86 context;
memset(&context,0,sizeof(context)); memset(&context,0,sizeof(context));
(*relay)(lpDosTask,&context,data); (*relay)(NULL,&context,data);
} else { } else {
ERR_(int)("IRQ without DOS task: should not happen"); ERR_(int)("IRQ without DOS task: should not happen");
} }

View File

@ -14,8 +14,10 @@
DEFAULT_DEBUG_CHANNEL(int) DEFAULT_DEBUG_CHANNEL(int)
#define QUEUELEN 31
typedef struct { typedef struct {
BYTE queuelen,queue[15],ascii[15]; BYTE queuelen,queue[QUEUELEN],ascii[QUEUELEN];
} KBDSYSTEM; } KBDSYSTEM;
/********************************************************************** /**********************************************************************
@ -76,6 +78,10 @@ void WINAPI INT_Int09SendScan( BYTE scan, BYTE ascii )
sys = calloc(1,sizeof(KBDSYSTEM)); sys = calloc(1,sizeof(KBDSYSTEM));
DOSVM_SetSystemData(0x09,sys); DOSVM_SetSystemData(0x09,sys);
} }
if (sys->queuelen == QUEUELEN) {
ERR("keyboard queue overflow\n");
return;
}
/* add scancode to queue */ /* add scancode to queue */
sys->queue[sys->queuelen] = scan; sys->queue[sys->queuelen] = scan;
sys->ascii[sys->queuelen++] = ascii; sys->ascii[sys->queuelen++] = ascii;