gamepads icon indicating copy to clipboard operation
gamepads copied to clipboard

Wrong mapping on iOS

Open wantroba opened this issue 10 months ago • 0 comments

My implementation is fine on Windows and Android, but I think there is a problem with the gamepads lib when mapping analog sticks on iOS.

Test it with this simple code:

_subscription = Gamepads.events.listen((event) {
   debugPrint("${gamePadEvent.type.name}|${gamePadEvent.key}|${gamePadEvent.value}");
});

I'll paste the outputs when I press the buttons

UP: button|dpad - xAxis|-0.0 DOWN: button|dpad - xAxis|-0.0 LEFT: button|dpad - xAxis|-1.0 RIGHT: button|dpad - xAxis|1.0

As you can see, the lib is treating them as 'buttons' and not as 'analog', in addition UP and DOWN come the same and on the X axis, when they should be on the Y.

I think the correct outputs should be: UP: analog|dpad - yAxis|1.0 DOWN: analog|dpad - yAxis|-1.0 LEFT: analog|dpad - xAxis|-1.0 RIGHT: analog|dpad - xAxis|1.0

I used this app to check if my controller is correctly configured: https://apps.apple.com/br/app/game-controller-tester/id859236726

wantroba avatar Jun 23 '25 13:06 wantroba