Skip to content

Commit

Permalink
Properly fix serial mouse wheel.
Browse files Browse the repository at this point in the history
  • Loading branch information
OBattler committed Aug 26, 2023
1 parent 41079a4 commit 42ea22e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/device/mouse_serial.c
Expand Up @@ -381,12 +381,7 @@ sermouse_report(mouse_t *dev)
static void
sermouse_transmit_report(mouse_t *dev, int from_report)
{
int changed = mouse_state_changed();

if (dev->but == 4)
changed |= mouse_wheel_moved();

if (mouse_capture && changed)
if (mouse_capture && mouse_state_changed())
sermouse_transmit(dev, sermouse_report(dev), from_report, 1);
else {
if (dev->prompt || dev->continuous)
Expand Down Expand Up @@ -912,7 +907,7 @@ sermouse_init(const device_t *info)
sermouse_set_period(dev, 5000000.0);

/* Tell them how many buttons we have. */
mouse_set_buttons((dev->flags & FLAG_3BTN) ? 3 : 2);
mouse_set_buttons(dev->but);

/* Return our private data to the I/O layer. */
return dev;
Expand Down

0 comments on commit 42ea22e

Please sign in to comment.