diff --git a/subsystems/ntvdm/ps2.c b/subsystems/ntvdm/ps2.c index cdaacd263e3..5138d0b887c 100644 --- a/subsystems/ntvdm/ps2.c +++ b/subsystems/ntvdm/ps2.c @@ -93,9 +93,13 @@ BYTE KeyboardReadStatus() { BYTE Status = 0; + WaitForSingleObject(QueueMutex, INFINITE); + /* Set the first bit if the data can be read */ if (KeyboardReadResponse || !KeyboardQueueEmpty) Status |= 1 << 0; + ReleaseMutex(QueueMutex); + /* Always set bit 2 */ Status |= 1 << 2;