We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2477 - [PATCH] Joysticks do not work on RHEL6/CentOS6 systems
Summary: [PATCH] Joysticks do not work on RHEL6/CentOS6 systems
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-03 09:00 UTC by Ashley Whetter
Modified: 2014-04-18 03:19 UTC (History)
1 user (show)

See Also:


Attachments
A patch to fallback to detecting input devices using ID_CLAS (944 bytes, patch)
2014-04-03 09:00 UTC, Ashley Whetter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ashley Whetter 2014-04-03 09:00:44 UTC
Created attachment 1603 [details]
A patch to fallback to detecting input devices using ID_CLAS

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.
Comment 1 Sam Lantinga 2014-04-18 03:19:37 UTC
Looks good to me, thanks!
https://hg.libsdl.org/SDL/rev/a4346af9eec4