[PATCH] Joysticks do not work on RHEL6/CentOS6 systems

Hello everyone,

RHEL6 and CentOS6 systems still use an old version of udev (147). It
wasn’t until udev 148 (Yep. 1 version off!) that the input class system
changed from “ID_CLASS” to “ID_INPUT_{JOYSTICK,KEYBOARD,MOUSE,etc}”
(http://lwn.net/Articles/364728/). Because SDL2 looks for the ID_INPUT_X
field this means that it never detects any input devices on RHEL6
systems.

I’ve attached a patch which fixes the problem. If no input devices are
detected with “ID_INPUT_X” then SDL will fallback to looking for the old
style “ID_CLASS” udev field instead.
Because of the “big change” between udev versions I doubt it’ll ever get
upgraded on RHEL6, but because RHEL7 is on the way I don’t know if this
patch is worth merging. Hopefully it’ll help anyone out that’s having
this problem though.

Ashley

P.S. I was going to submit this to the bugzilla but I haven’t received
any emails from it to create an account.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: rhelInputs.patch
Type: text/x-diff
Size: 943 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20140327/fee1622c/attachment.patch

P.S. I was going to submit this to the bugzilla but I haven’t received
any emails from it to create an account.

Grr, the thing that sends bugzilla mail keeps crashing or something.
Just kicked it again, you should get mail soon. Sorry!

–ryan.

Thanks. That’s worked. I’ve resubmitted to bugzilla:
https://bugzilla.libsdl.org/show_bug.cgi?id=2477

AshleyOn 2014-03-28 02:54, Ryan C. Gordon wrote:

P.S. I was going to submit this to the bugzilla but I haven’t received
any emails from it to create an account.

Grr, the thing that sends bugzilla mail keeps crashing or something.
Just kicked it again, you should get mail soon. Sorry!

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org