aboutsummaryrefslogtreecommitdiff
path: root/mousetsr.c
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-14 01:59:35 +0200
committerJavier <dev.git@javispedro.com>2022-04-14 01:59:35 +0200
commitc732fc60d5b07417146c750c65faee419083efc9 (patch)
treee57bcd2e119185052ba439ae78340d1c374c6473 /mousetsr.c
parentb11d085f98465aae2b5a861066b963fce5aeaae3 (diff)
downloadvbados-c732fc60d5b07417146c750c65faee419083efc9.tar.gz
vbados-c732fc60d5b07417146c750c65faee419083efc9.zip
don't clear last mouse click position once it is read
Diffstat (limited to 'mousetsr.c')
-rw-r--r--mousetsr.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/mousetsr.c b/mousetsr.c
index ca48f13..b9e9fc7 100644
--- a/mousetsr.c
+++ b/mousetsr.c
@@ -1038,8 +1038,6 @@ static void return_clear_wheel_counter(union INTPACK __far *r)
r->x.cx = snap_to_grid(data.wheel_last.x, data.screen_granularity.x);
r->x.dx = snap_to_grid(data.wheel_last.y, data.screen_granularity.y);
r->x.bx = data.wheel_delta;
- data.wheel_last.x = 0;
- data.wheel_last.y = 0;
data.wheel_delta = 0;
}
@@ -1048,8 +1046,6 @@ static void return_clear_button_counter(union INTPACK __far *r, struct buttoncou
r->x.cx = snap_to_grid(c->last.x, data.screen_granularity.x);
r->x.dx = snap_to_grid(c->last.y, data.screen_granularity.y);
r->x.bx = c->count;
- c->last.x = 0;
- c->last.y = 0;
c->count = 0;
}
@@ -1068,10 +1064,16 @@ static void int33_handler(union INTPACK r)
r.x.bx = NUM_BUTTONS;
break;
case INT33_SHOW_CURSOR:
+#if TRACE_EVENTS
+ dlog_puts("Mouse show cursor");
+#endif
data.visible_count++;
refresh_cursor();
break;
case INT33_HIDE_CURSOR:
+#if TRACE_EVENTS
+ dlog_puts("Mouse hide cursor");
+#endif
data.visible_count--;
refresh_cursor();
break;
@@ -1104,6 +1106,9 @@ static void int33_handler(union INTPACK r)
bound_position_to_window();
break;
case INT33_GET_BUTTON_PRESSED_COUNTER:
+#if TRACE_EVENTS
+ dlog_puts("Mouse get button pressed counter");
+#endif
r.x.ax = data.buttons;
#if USE_WHEEL
if (data.haswheel) {
@@ -1120,6 +1125,9 @@ static void int33_handler(union INTPACK r)
&data.button[MIN(r.x.bx, NUM_BUTTONS - 1)].pressed);
break;
case INT33_GET_BUTTON_RELEASED_COUNTER:
+#if TRACE_EVENTS
+ dlog_puts("Mouse get button released counter");
+#endif
r.x.ax = data.buttons;
#if USE_WHEEL
if (data.haswheel) {