XBox controller behaviour

Hi,

I'm porting my Android game to OUYA. I don't have a console at the moment, so just coded it against version 1.0.0. A friend with a console tested it for me and confirmed controls are working as expected.

Today I've got an XBox controller and tried it on Nexus 7. As soon as I pressed any of the buttons, the game crashed with a NPE thrown by ouya code. I downloaded 1.0.1, crashing resolved but controls dont work as expected. By further digging, I've found these:

1. If I dont return false from onGenericMotionEvent(..), DPad events (onKeyDown, onKeyUp) are not generated.
2. Analog triggers don't generate onKeyDown, onKeyUp events.

Are these the actual behaviour of console + original controller or only applies to Xbox controller + Nexus 7 combination?

Thanks,
r a f t

Comments

  • raftraft Posts: 19Member
    3. A (green) button generates both BUTTON_O and KEYCODE_BACK events
    4. B (red) button generates both BUTTON_A and KEYCODE_BACK events
Sign In or Register to comment.