| Summary: | Linux events, joysticks having only hat are not read | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Nicolas Adenis-Lamarre <nicolas.adenis.lamarre> |
| Component: | joystick | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabomdq |
| Version: | 2.0.0 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
|
Description
Nicolas Adenis-Lamarre
2013-07-07 15:31:06 UTC
some other devices not detected : "Nintendo Wii Remote IR" and "Nintendo Wii Remote Acceleromete" because they are just axes. (i can however understand that it's not joysticks, and in my own opinion, the 3 devices should be only 1 because it's physically only 1 ) name : "Nintendo Wii Remote IR" bits ev : EV_SYN EV_ABS name : "Nintendo Wii Remote" bits ev : EV_SYN EV_KEY EV_FF name : "Nintendo Wii Remote Acceleromete" bits ev : EV_SYN EV_ABS the worst effect making this test less restrictive is to have some non joystick devices recognized as a joystick.
not really a keyboard, because a keyboard with axes could be considered as a joystick, but the question is more not detect a mouse as a joystick.
I could think this test has been added to difference a joystick and a mouse ; but in my humble opinion, the wiimote can be considered as a joystick and as mouse for the IR part at least.
At least having a hat, make your device a joystick, i think.
isn't it possible to add eventDevices including all of them and let the application choose what it needs to filter on ?
For example, for a game, i could have the need of only one axis to increase or decrease a value (speed for example).
what about an argument when initializing joysticks ?
struct joystickRequirements {
// something which help to customize EV_IsJoystick() behavior
// hasAxisX, hasAxisY, hasHATX, hasHATY, hasButton = true/false
// minimum list of required button = A 1 TRIGGER
};
defaultJoystickRequirements { // default value when initializing joystick
// something which define the default behavior
};
My two cents, with UDEV hotplugging in place, I think the IsJoystick test can be relaxed completely (if the device addition comes from UDEV). Agreed, as long as udev actually identifies it as a joystick device. Gabriel, do you want to make that change? Hopefully this fixes it: http://hg.libsdl.org/SDL/rev/4434ab25abf3 |