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 1866 - Wheel not detected as joystick or gamepad
Summary: Wheel not detected as joystick or gamepad
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.0
Hardware: x86 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-25 13:53 UTC by Pete Allen
Modified: 2013-11-14 13:24 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pete Allen 2013-05-25 13:53:54 UTC
A Guillemot Force Feedback Racing Wheel (Ferrari badged, circa 2000) is not detected as a joystick. The reason for this is that it supports the following events instead of ABS_X and ABS_Y:

 Event code 8 (ABS_WHEEL)
 Event code 9 (ABS_GAS)
 Event code 10 (ABS_BRAKE)

so the test in IsJoystick() fails as ABS_X and ABS_Y are not supported:
    if (!(test_bit(EV_KEY, evbit) && test_bit(EV_ABS, evbit) &&
         test_bit(ABS_X, absbit) && test_bit(ABS_Y, absbit))) 

In my local version I bodged this to
    if (!(test_bit(EV_KEY, evbit) && test_bit(EV_ABS, evbit) &&
          test_bit(ABS_WHEEL, absbit) && test_bit(ABS_GAS, absbit))) {

and the wheel works correctly (although clearly this would break every other joystick..)
Comment 1 Gabriel Jacobo 2013-11-11 22:34:41 UTC
Do you experience this with the latest from HG and udev enabled?
Comment 2 Gabriel Jacobo 2013-11-14 13:24:44 UTC
I've added a few troubleshooting tips to the README-linux.txt file, this is probably the best we can do as a "fix" (along with the actual fixes available in HG)