aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-30 17:04:25 +0200
committerJavier <dev.git@javispedro.com>2022-04-30 17:04:25 +0200
commitff69feb4cacb191a278395c08490b3f97e280ad6 (patch)
treed2ec3b7891125e628c62fc6e2d7d68c5b3a5ef72
parentda8b5a53bb615fb8020dd294ebdbaa6bb776fad6 (diff)
downloadvbados-ff69feb4cacb191a278395c08490b3f97e280ad6.tar.gz
vbados-ff69feb4cacb191a278395c08490b3f97e280ad6.zip
workaround for programs that do not call full mouse reset
-rw-r--r--mousetsr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mousetsr.c b/mousetsr.c
index 147ec2c..a03da07 100644
--- a/mousetsr.c
+++ b/mousetsr.c
@@ -1331,6 +1331,10 @@ static void int33_handler(union INTPACK r)
dlog_puts("Mouse reset settings");
reload_video_info();
reset_mouse_settings();
+ if (!data.bios_packet_size || !data.packet_size) {
+ // Someone is calling this without calling reset first
+ reset_mouse_hardware();
+ }
reset_mouse_state();
r.w.ax = INT33_MOUSE_FOUND;
r.w.bx = NUM_BUTTONS;