Skip to content

Commit a915b51

Browse files
committed
Initialize keyboard emulation on port reading.
This ensures that applications that only read the keyboard port works.
1 parent d17699c commit a915b51

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/keyb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,8 @@ void update_keyb(void)
478478
// Handle keyboard controller port reading
479479
uint8_t keyb_read_port(unsigned port)
480480
{
481+
if(queued_key == -1)
482+
kbhit();
481483
debug(debug_int, "keyboard read_port: %02X (key=%04X)\n", port, queued_key);
482484
if(port == 0x60)
483485
return queued_key >> 8;

0 commit comments

Comments
 (0)