[Bug 250724] USB gamepads are tagged as a mouse by udev
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Oct 29 18:24:35 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250724
--- Comment #3 from Vladimir Kondratyev <wulf at freebsd.org> ---
(In reply to Alex S from comment #2)
> X11 itself lacks any support for joysticks,
> it only knows (and able to present to applications)
> keyboard and pointer devices.
Actually, X11 does know of joystick presence. See udev autoconfiguration
backend sources:
https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/config/udev.c#L254
But... FreeBSD does not have sysfs and most likely will never have, so libudev
is a shim which uses libmagic-alike heuristics taken from xf86-input-evdev to
detect device type and type tag based on device's evdev descriptor:
https://github.com/FreeBSDDesktop/libudev-devd/blob/master/udev-utils.c#L410
It is highly likely that this logic was not ever tested and just does not work
in joystick part. So we can try to fix it or e.g. steal from alternative
udev-shim library:
https://github.com/jiixyj/libudev-fbsd/blob/master/src/libudev.c#L245
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-usb
mailing list