| Summary: | Incorrect number of axes for some gamepads (ex. PlayStation 3 Controller) | ||
|---|---|---|---|
| Product: | SDL | Reporter: | spaz16 |
| Component: | joystick | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | frank.praznik, frank, icculus |
| Version: | don't know | Keywords: | target-2.0.4, triage-2.0.4 |
| Hardware: | All | ||
| OS: | Linux | ||
| Attachments: | Patch for SDL 2.0.3 | ||
I ran into this issue myself. On 2.0.0 (packaged on ubuntu) the axes show up but don't respond to button presses. On 2.0.1-2.0.3 they do not show up at all. With the suggested patch they show up and their state is correctly reported. We were using ABS_MISC because some important controller was reporting incorrect axes, but this could have been a driver bug at the time, or a misunderstanding. I can't remember the exact reason at the moment. We should put this patch in for 2.0.4. --ryan. Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though! If ABS_MISC usage is really important for other game controller, you can do an exception for PlayStation 3 Controller (and maybe for some others). (sorry if you get a lot of copies of this email, I'm marking several bugs at once) Marking bugs for the (mostly) final 2.0.4 TODO list. This means we're hoping to resolve this bug before 2.0.4 ships if possible. In a perfect world, the open bug count with the target-2.0.4 keyword is zero when we ship. (Note that closing a bug report as WONTFIX, INVALID or WORKSFORME might still happen.) --ryan. Just FYI, applying this patch means that Dualshock 4 touchpad events will be exposed as joystick axes since it sends ABS_MT_* events for the touchpad. The Sony employee who wrote the DS3 HID descriptor left several axes in there that do nothing and cause the useful ones to spill over into the multitouch space so just ignoring axes above ABS_MT_SLOT won't work either. This patch is now https://hg.libsdl.org/SDL/rev/6c86d3216f6a, thanks! --ryan. |
Created attachment 1861 [details] Patch for SDL 2.0.3 The function "SDL_JoystickNumAxes()" returns 4 axes for PS3 game controller. This device has more than 4 axes, and all of them can be read using Linux drivers. There is a bug in Linux version of "SDL_sysjoystick.c". "ABS_MISC" cannot be used to get values from all axes. I suggest to use "ABS_MAX" instead of "ABS_MISC".