diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-07-08 10:13:46 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-07-08 10:13:46 +0100 |
commit | d152cc0fd57892bfc1e1eb9e662a5004d8447c51 (patch) | |
tree | db42e15e83c575f1fca7ac49d8c6b0186030da38 /src | |
parent | 87388f510f800aa4bc1bb78e35b488ea5636ce87 (diff) | |
download | gold-mine-run-d152cc0fd57892bfc1e1eb9e662a5004d8447c51.tar.gz gold-mine-run-d152cc0fd57892bfc1e1eb9e662a5004d8447c51.zip |
Don't chain to the BIOS int handler
Diffstat (limited to 'src')
-rw-r--r-- | src/keyb.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); } |