So I’m trying to ship a game on Android soon with gamepad support. It mostly works, and kudos to the team for the fast work on that. But I had a few design questions about it that I need to work out in the next few days…
The buttons on Android seem pretty clearly labelled in the SDK, but the buttons are passed through in the numerical order as given in the SDK instead of corresponding to the Xbox 360 layout. I was under the impression that this was intentional, but the talk at Steam Dev Days seemed to indicate that this was just because the gamepad support was not finished yet. Is this the case, or is the intent to keep the current android button layout, and pass them on directly to the application? I need to make controller layout files soon, so this would be useful information.
The DPAD is driving me crazy. Currently it looks like the plan is to forward the DPAD events as hat stick events and swallow the actual DPAD digital button presses? After fighting with it for a bit, that honestly seems reasonable. But the controller mapping file doesn’t seem to support setting specific axis directions as digital buttons, so there’s no way of truly mimicking a 360 controller on Android with SDL right now. Is there any plan on how to handle this properly? For the time being, I am just forwarding the DPAD axis as button events on our end.
Axis IDs are simply swallowed, and the gamepad axes are sent to SDL in a semi-random order. Sorting the array by axis ID would seem to mimic the behaviour on other platforms, as they would have sequential ids. But it would really be nice to tell the application exactly what the axis is for… Perhaps a SDL_JoystickGetAxisID() function would be nice?