| Summary: | [Android] Joystick axes handling is broken | ||
|---|---|---|---|
| Product: | SDL | Reporter: | ny00 |
| Component: | joystick | Assignee: | Gabriel Jacobo <gabomdq> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabomdq |
| Version: | HG 2.1 | ||
| Hardware: | All | ||
| OS: | Android (All) | ||
|
Description
ny00
2013-11-07 14:28:54 UTC
Status update: Looks like some recent changes to the code have made the first two axes functional, and testjoystick reports input from all buttons, as well as the same two axes (or AXIS_X and AXIS_Y in the Android language). It is still the case that the rest of the axes, including the HAT switch, seem to be ignored, though. Excellent! I have tested a recent revision of SDL (possibly not the very last one) that includes this changeset on two Android-powered devices, with two USB controllers (via USB-OTG). For all analog axes, including the HAT switches of the controllers, I see illustrations of the input values as expected. The same applies to the binary buttons, of course. So thanks! Two notes to add: - The axis of one of the controller identified as MotionEvent.AXIS_THROTTLE (which as written both is the 5th and is actually a part of an analog stick) has its motion range normalized as expected. If there is actually a controller for which it should not be done, guess the game should let the player handle it in its own way; Or alternatively, if applicable, use the SDL_GameController API. - With the current state of SDL2 in HG, true controller support should be easier to implement in a cross-platform manner, not just for Windows, OS X and (desktop) Linux, but also for Android. I'm not yet sure about that, but this can be a big step forward! |