BarrowBloke
Member
Hi,
Does anyone have any experience of using gamepad_test_mapping() successfully?
I've noticed that the mappings returned by gamepad_get_mapping() and used as input by gamepad_test_mapping() don't align to the buttons used by gamepad_button_value().
Initially I noticed this on Android but I've also verified this on Windows.
E.g I'm testing using an OUYA controller on Windows which has the automatic mapping
36280100000000000000504944564944,OUYA Controller,platform:Windows,a:b0,b:b3,x:b1,y:b2,leftshoulder:b4,rightshoulder:b5,lefttrigger:b12,righttrigger:b13,guide:b15,start:b14,leftstick:b6,rightstick:b7,dpup:b8,dpdown:b9,dpleft:b10,dpright:b11,leftx:a0,lefty:a1,rightx:a3,righty:a4
which would indicate that
a = gp_face1 = button 0
b = gp_face2 = button 3
x = gp_face3 = button 1
y = gp_face4 = button 2
However if I loop through all the buttons and use gamepad_get_value() to see which button numbers are triggered then I see
gp_face1 = button 0 (so this one matches)
gp_face2 = button 1
gp_face3 = button 2
gp_face4 = button 3
If I use these values to create a new mapping string and use gamepad_test_mapping() to implement it then chaos ensues.
It means I can't use this approach of noting the button numbers and creating a new mapping string to solve the situation where a gamepad has no default button mapping available.
Any ideas?
Barrowbloke
Does anyone have any experience of using gamepad_test_mapping() successfully?
I've noticed that the mappings returned by gamepad_get_mapping() and used as input by gamepad_test_mapping() don't align to the buttons used by gamepad_button_value().
Initially I noticed this on Android but I've also verified this on Windows.
E.g I'm testing using an OUYA controller on Windows which has the automatic mapping
36280100000000000000504944564944,OUYA Controller,platform:Windows,a:b0,b:b3,x:b1,y:b2,leftshoulder:b4,rightshoulder:b5,lefttrigger:b12,righttrigger:b13,guide:b15,start:b14,leftstick:b6,rightstick:b7,dpup:b8,dpdown:b9,dpleft:b10,dpright:b11,leftx:a0,lefty:a1,rightx:a3,righty:a4
which would indicate that
a = gp_face1 = button 0
b = gp_face2 = button 3
x = gp_face3 = button 1
y = gp_face4 = button 2
However if I loop through all the buttons and use gamepad_get_value() to see which button numbers are triggered then I see
gp_face1 = button 0 (so this one matches)
gp_face2 = button 1
gp_face3 = button 2
gp_face4 = button 3
If I use these values to create a new mapping string and use gamepad_test_mapping() to implement it then chaos ensues.
It means I can't use this approach of noting the button numbers and creating a new mapping string to solve the situation where a gamepad has no default button mapping available.
Any ideas?
Barrowbloke