mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-20 20:50:07 +01:00
Replace ABS_MT_SLOT - 1 with the v4.20 ABS_RESERVED define
ABS_RESERVED was added to 4.20 for that reason, to keep that event code reserved so we can't use it for anything else (and thus mess up the fake MT detection). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
29628dc2c3
commit
6852dadbca
2 changed files with 3 additions and 3 deletions
|
|
@ -461,10 +461,10 @@ libevdev_set_fd(struct libevdev* dev, int fd)
|
||||||
|
|
||||||
dev->fd = fd;
|
dev->fd = fd;
|
||||||
|
|
||||||
/* devices with ABS_MT_SLOT - 1 aren't MT devices,
|
/* devices with ABS_RESERVED aren't MT devices,
|
||||||
see the documentation for multitouch-related
|
see the documentation for multitouch-related
|
||||||
functions for more details */
|
functions for more details */
|
||||||
if (!libevdev_has_event_code(dev, EV_ABS, ABS_MT_SLOT - 1) &&
|
if (!libevdev_has_event_code(dev, EV_ABS, ABS_RESERVED) &&
|
||||||
libevdev_has_event_code(dev, EV_ABS, ABS_MT_SLOT)) {
|
libevdev_has_event_code(dev, EV_ABS, ABS_MT_SLOT)) {
|
||||||
const struct input_absinfo *abs_info;
|
const struct input_absinfo *abs_info;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -688,7 +688,7 @@ extern "C" {
|
||||||
* meaning, matching the axis names in linux/input.h. Some devices merely
|
* meaning, matching the axis names in linux/input.h. Some devices merely
|
||||||
* export a number of axes beyond the available axis list. For those
|
* export a number of axes beyond the available axis list. For those
|
||||||
* devices, the multitouch information is invalid. Specifically, if a device
|
* devices, the multitouch information is invalid. Specifically, if a device
|
||||||
* provides the ABS_MT_SLOT axis AND also the (ABS_MT_SLOT - 1) axis, the
|
* provides the ABS_MT_SLOT axis AND also the ABS_RESERVED axis, the
|
||||||
* device is not treated as multitouch device. No slot information is
|
* device is not treated as multitouch device. No slot information is
|
||||||
* available and the ABS_MT axis range for these devices is treated as all
|
* available and the ABS_MT axis range for these devices is treated as all
|
||||||
* other EV_ABS axes.
|
* other EV_ABS axes.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue