Commit 6200a48b authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

Fixed a few problems.

parent 28bbdb77
......@@ -398,7 +398,7 @@ void DOSVM_Wait( int read_pipe, HANDLE hObject )
int objc;
BOOL got_msg = FALSE;
objs[0]=GetStdHandle(STD_INPUT_HANDLE);
objs[0]=lpDosTask->hConInput;
objs[1]=hObject;
objc=hObject?2:1;
do {
......@@ -684,7 +684,7 @@ void DOSVM_QueueEvent( int irq, int priority, void (*relay)(LPDOSTASK,CONTEXT86*
/* callback event, perform it with dummy context */
CONTEXT86 context;
memset(&context,0,sizeof(context));
(*relay)(lpDosTask,&context,data);
(*relay)(NULL,&context,data);
} else {
ERR_(int)("IRQ without DOS task: should not happen");
}
......
......@@ -14,8 +14,10 @@
DEFAULT_DEBUG_CHANNEL(int)
#define QUEUELEN 31
typedef struct {
BYTE queuelen,queue[15],ascii[15];
BYTE queuelen,queue[QUEUELEN],ascii[QUEUELEN];
} KBDSYSTEM;
/**********************************************************************
......@@ -76,6 +78,10 @@ void WINAPI INT_Int09SendScan( BYTE scan, BYTE ascii )
sys = calloc(1,sizeof(KBDSYSTEM));
DOSVM_SetSystemData(0x09,sys);
}
if (sys->queuelen == QUEUELEN) {
ERR("keyboard queue overflow\n");
return;
}
/* add scancode to queue */
sys->queue[sys->queuelen] = scan;
sys->ascii[sys->queuelen++] = ascii;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment