Hi guys,
I've got an Xperia play which comes with that nice built in gamepad, so the first question I asked was how to I use it in my games!
The good news is that I have some of the buttons working. Not all of them, but here's what I've worked out so far.
The D-Pad codes are:
Up key = 39
Down key = 37
Right key = 40
Left key = 38
On the right playstation buttons I could only get the circle key to work.
Circle = 27
Non-functional buttons:
Triangle, Square, X, Select and Start and menu.
This is tested using:
keynum2 as string
SetDisplayAspect( 4.0/3.0 )
do
keynum = GetRawLastKey( )
keynum2 = "keycode: " + str(keynum)
print(keynum2)
sync()
loop
While there isn't full support, this partial support may be handy if you're producing a simple shooter, space invaders game or whatever. If anyone knows away of getting the other buttons to work that I'm not aware of yet please let us all know!
I have also tried to get some kind of mouse or joystick input from the two analog virtual sticks which unsurprisingly yielded no results. But again if anyone knows a way of getting this to work please let us all know, again!