From d152cc0fd57892bfc1e1eb9e662a5004d8447c51 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 8 Jul 2023 10:13:46 +0100 Subject: Don't chain to the BIOS int handler --- src/keyb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/keyb.c') diff --git a/src/keyb.c b/src/keyb.c index 3862871..6580c13 100644 --- a/src/keyb.c +++ b/src/keyb.c @@ -16,6 +16,8 @@ static void keyb_handler() keys[k & 127] = 0; else keys[k] = 1; + + outportb(0x20, 0x20); } void keyb_init() @@ -23,11 +25,14 @@ void keyb_init() _go32_dpmi_get_protected_mode_interrupt_vector(9, &old_handler); new_handler.pm_offset = (unsigned long)keyb_handler; new_handler.pm_selector = _go32_my_cs(); - _go32_dpmi_chain_protected_mode_interrupt_vector(9, &new_handler); + _go32_dpmi_allocate_iret_wrapper(&new_handler); + _go32_dpmi_set_protected_mode_interrupt_vector(9, &new_handler); } void keyb_free() { if (_go32_dpmi_set_protected_mode_interrupt_vector(9, &old_handler) == -1) fprintf(stderr, "Failed to free the keyb :(\n"); + else + _go32_dpmi_free_iret_wrapper(&new_handler); } -- cgit v1.2.3