Some needed changes for hard resets

This commit is contained in:
Cacodemon345
2025-03-28 00:10:16 +06:00
parent 81e6b2a40a
commit 8861741945
3 changed files with 7 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ static scancode *scan_table; /* scancode table for keyboard */
static volatile uint8_t caps_lock = 0;
static volatile uint8_t num_lock = 0;
static volatile uint8_t scroll_lock = 0;
static uint8_t shift = 0;
static uint8_t shift = 0;
static int key5576mode = 0;

View File

@@ -3764,12 +3764,12 @@ keyboard_at_init(const device_t *info)
if (dev->port != NULL) {
kbc_at_dev_reset(dev, 0);
keyboard_update_states(0, 0, 0);
bat_counter = 0x0000;
}
keyboard_send = add_data_kbd;
SavedKbd = dev;
keyboard_update_states(0, 0, 0);
inv_cmd_response = (dev->type & FLAG_PS2) ? 0xfe : 0xfa;
@@ -3788,6 +3788,8 @@ keyboard_at_close(void *priv)
/* Disable the scancode maps. */
keyboard_set_table(NULL);
keyboard_update_states(0, 0, 0);
SavedKbd = NULL;
free(dev);