Skip to content

Commit

Permalink
input-raw.c: support MT-only devices in ts_read()
Browse files Browse the repository at this point in the history
struct ts_sample is pressure-based. MT-only devices don't even have to
report an EV_KEY type like BTN_TOUCH. Their pen_up is tracking_id == -1.

Fixes #104

Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
  • Loading branch information
merge committed Sep 8, 2017
1 parent f9bba9c commit 1ad02d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/input-raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,10 @@ static int ts_input_read(struct tslib_module_info *inf,
case ABS_MT_PRESSURE:
i->current_p = ev.value;
break;
case ABS_MT_TRACKING_ID:
if (ev.value == -1)
i->current_p = 0;
break;
}
}
break;
Expand Down

0 comments on commit 1ad02d4

Please sign in to comment.