Skip to content

Commit

Permalink
Report finger touches if in Pen or Finger mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 committed May 20, 2024
1 parent a741fb9 commit 005f96d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/device/mouse_microtouch_touchscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ mtouch_poll(void *priv)
abs_x_int = abs_x * 16383;
abs_y_int = 16383 - abs_y * 16383;

fifo8_push(&dev->resp, 0b11000000 | ((dev->pen_mode & 2) ? ((1 << 5) | ((b & 3))) : 0));
fifo8_push(&dev->resp, 0b11000000 | ((dev->pen_mode == 2) ? ((1 << 5) | ((b & 3))) : 0));
fifo8_push(&dev->resp, abs_x_int & 0b1111111);
fifo8_push(&dev->resp, (abs_x_int >> 7) & 0b1111111);
fifo8_push(&dev->resp, abs_y_int & 0b1111111);
Expand All @@ -279,12 +279,12 @@ mtouch_poll(void *priv)
dev->b &= ~1;
abs_x_int = dev->abs_x * 16383;
abs_y_int = 16383 - dev->abs_y * 16383;
fifo8_push(&dev->resp, 0b11000000 | ((dev->pen_mode & 2) ? ((1 << 5)) : 0));
fifo8_push(&dev->resp, 0b11000000 | ((dev->pen_mode == 2) ? ((1 << 5)) : 0));
fifo8_push(&dev->resp, abs_x_int & 0b1111111);
fifo8_push(&dev->resp, (abs_x_int >> 7) & 0b1111111);
fifo8_push(&dev->resp, abs_y_int & 0b1111111);
fifo8_push(&dev->resp, (abs_y_int >> 7) & 0b1111111);
fifo8_push(&dev->resp, 0b10000000 | ((dev->pen_mode & 2) ? ((1 << 5)) : 0));
fifo8_push(&dev->resp, 0b10000000 | ((dev->pen_mode == 2) ? ((1 << 5)) : 0));
fifo8_push(&dev->resp, abs_x_int & 0b1111111);
fifo8_push(&dev->resp, (abs_x_int >> 7) & 0b1111111);
fifo8_push(&dev->resp, abs_y_int & 0b1111111);
Expand Down

0 comments on commit 005f96d

Please sign in to comment.