This function can be used to retrieve the mapping string for the gamepad. This string will be either:
"050000005e040000fd020000ffff3f00,Xbox Wireless Controller,a:b0,b:b1,start:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b6,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,x:b2,y:b3,platform:android"
For more information on the formatting of the returned map string, please see the function gamepad_test_mapping().
gamepad_get_mapping(index);
Argument | Type | Description |
---|---|---|
index | Real | Which gamepad index "slot" to get the mapping from. |
var _gpMap = gamepad_get_mapping(global.PadIndex);
show_debug_message("Gamepad Mapping = " + _gpMap);
The above code get the map string for the given gamepad slot, and then output it to the console for debugging.