There comes my second problem with the gamepad:

Why the buttons positions are inconsistent between systems?

Same as before, I've wrote a simple button handler for all active gamepads:

public static inline function getButton(button:String):Bool { var gamepads:Array< FlxGamepad > = FlxG.gamepads.getActiveGamepads(); var press:Bool = false; for (gamepad in gamepads) { switch (button) { case "OK": press = gamepad.justPressed.A; case "BACK": press = gamepad.justPressed.B; case "QUIT": press = gamepad.justPressed.Y; } } return press; }

Assuming that the Gamepad doc is right , checking gamepad.justPressed.Y; should return the state of the Y button on the gamepad.
So I've tried with an XBOX controller and a PS3 one, everything is fine for the Flash export.
But when I play my game on OUYA, the Y button is swapped with the X button (I'm talking about XBOX layout. To make it simple, I'll always put the XBOX layout in bold otherwise explanations are going to be complicated). So these two buttons are swapped on the OUYA gamepade (U/Y), but also on the PS3 gamepad (square/triangle).

I've checked the mapping on OUYA, and it should work:

case OUYAID.O: A; case OUYAID.A: B; case OUYAID.U: X; case OUYAID.Y: Y;

Am I missing something?

Also you may wonder why the heck I'm still struggling with my "almost dead" OUYA? It's because the NVIDIA shield TV gamepad is not supported yet (and that's gonna be my next question).