XPERIA Play joystick not working

Create issue
Issue #52 wontfix
Hristoz Stefanov created an issue

I've tested love for android on my xperia play, and it is running pretty smooth. The only problem I've found so far is that while it detects the presence of a joystick, that joystick only has 2 axes, which however are not input from the "sticks"; they are instead mapped to the accelerometer. Xperia Play and Xperia Play 2 have a Playstation like game pad with 4 more axes, a 4 button D-pad (similar to a hat), 2 sholder buttons and 4+2 other buttons of which only the O (circle) is currently mapped to the back button (which in turn is mapped to ESC). The rest of the components do not register any events.

Here's a reference image:

On a side note, it has 4 front buttons (back, home, menu and search) all of which work as expected, however the "search" button appears as "unknown" in love.

Comments (5)

  1. Martin Felis repo owner

    The joystick you are seeing is how the accelerometer is handled in the port. It seems to me the that it would require special handling on the Java side of SDL2 to make it work.

    Unfortunately I do not have such a device and therefore cannot implement and test it. Research would have to be done on how to handle the joystick of Xperia Play (e.g. documentation from Sony). Maybe asking the SDL2 developers on their development list could also give some information.

  2. Martin Felis repo owner

    Would be very nice to have however I do not see it fixed in a foreseeable future. Sorry about that.

  3. Log in to comment