| Summary: | Tell that SDL_JoystickNumButtons is unsupported | ||
|---|---|---|---|
| Product: | SDL | Reporter: | ny00 |
| Component: | joystick | Assignee: | Gabriel Jacobo <gabomdq> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | ||
| Version: | HG 2.1 | ||
| Hardware: | All | ||
| OS: | Android (All) | ||
|
Description
ny00
2013-11-06 16:12:23 UTC
I shall add that it still returns 0 for the accelerometer, as expected. This takes care of it: http://hg.libsdl.org/SDL/rev/f19c0aca56aa Thanks for this post (and the rest)! One comment that it may be worthy to add, at least for the information, now that I've thought about it: Technically, it seems like the d-pad keycodes are not defined to be gamepad keycodes, even if they do come from the buttons of many gamepads in practice. Besides the keycode names, the fact that the d-pad keycodes existed before "true" gamepad support was introduced (in fact, since API level 1), and furthermore the observation that the arrow keys of a standard USB/Bluetooth keyboard seem to get mapped to the directional d-pad keycodes, isGamepadButton seems to return "false" for the d-pad keycodes. See here for reference about isGamepadButton: http://cpeterso.com/blog/02012/10/firefox-18-for-android-adds-dom_key_location_joystick-support-for-game-controllers/ However, it is the case that actual game controllers seem to report true gamepad button presses, as well as d-pad presses. The OUYA controller is an example of such a controller, at least according to this: http://forums.ouya.tv/discussion/665/android-button-mappings |