Don't treat devices with (ABS_MT_SLOT - 1) as multitouch devices
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 20 Nov 2013 01:58:08 +0000 (11:58 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 10 Dec 2013 09:39:47 +0000 (19:39 +1000)
commit546efc783c7b952db1ebe6f10430ed7d73a2cb81
treedbe47f19c6dfc9ce799dffc41abba7fc626756b6
parent714c2ffa9e5891fe423212f623572c5dd6b7a04b
Don't treat devices with (ABS_MT_SLOT - 1) as multitouch devices

Some devices (PS3 sixaxis controller) merely have a bunch of axes, without the
semantic information that linux/input.h requires. For those, the ABS_MT range
may be merely another axis, not the special range that we need to treat it
with.

Use a simple heuristic: if ABS_MT_SLOT - 1 is enabled, don't treat ABS_MT as
multitouch axes. The ABS_MT_SLOT - 1 axis is not used for a real axis.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
libevdev/libevdev.c
libevdev/libevdev.h
test/test-libevdev-has-event.c