Skip to content

Commit

Permalink
input-raw: fix multitouch devices without BTN_TOUCH
Browse files Browse the repository at this point in the history
For type B devices, the tracking id is enough and there are devices out there
that rely on that.

Fixes #97
  • Loading branch information
merge committed May 15, 2017
1 parent 5d2fbf9 commit d39d358
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/input-raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,10 @@ static int check_fd(struct tslib_input *i)
!(absbit[BIT_WORD(ABS_MT_SLOT)] & BIT_MASK(ABS_MT_SLOT)))
i->type_a = 1;

/* for multitouch type B, tracking id is enough for pen down/up. type A
* has pen down/up through the list of (empty) SYN_MT_REPORT */
if (!(keybit[BIT_WORD(BTN_TOUCH)] & BIT_MASK(BTN_TOUCH) ||
keybit[BIT_WORD(BTN_LEFT)] & BIT_MASK(BTN_LEFT)) && i->type_a != 1) {
keybit[BIT_WORD(BTN_LEFT)] & BIT_MASK(BTN_LEFT)) && i->mt != 1) {
fprintf(stderr,
"tslib: Selected device is not a touchscreen (missing BTN_TOUCH or BTN_LEFT)\n");
return -1;
Expand Down

0 comments on commit d39d358

Please sign in to comment.