mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-08 11:19:14 +02:00
Ignore devices that have joystick buttons
This patch allows libinput to ignore devices that have joystick buttons. Signed-off-by: Krzysztof Sobiecki <sobkas@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
6a4ceed2b9
commit
7ae555a4a2
1 changed files with 9 additions and 0 deletions
|
|
@ -1266,6 +1266,15 @@ evdev_configure_device(struct evdev_device *device)
|
||||||
has_keyboard = 0;
|
has_keyboard = 0;
|
||||||
has_touch = 0;
|
has_touch = 0;
|
||||||
|
|
||||||
|
for (i = BTN_JOYSTICK; i < BTN_DIGI; i++) {
|
||||||
|
if (libevdev_has_event_code(evdev, EV_KEY, i)) {
|
||||||
|
log_info(libinput,
|
||||||
|
"input device '%s', %s is a joystick, ignoring\n",
|
||||||
|
device->devname, devnode);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (libevdev_has_event_type(evdev, EV_ABS)) {
|
if (libevdev_has_event_type(evdev, EV_ABS)) {
|
||||||
|
|
||||||
if ((absinfo = libevdev_get_abs_info(evdev, ABS_X))) {
|
if ((absinfo = libevdev_get_abs_info(evdev, ABS_X))) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue