With this function you can retrieve the GUID for the gamepad connected to the given slot index. You supply the gamepad slot to check (from 0 - 11), and the function will return one of the following strings:
This function would usually be used in conjunction with gamepad_get_description() to generate part of the SDL string required for remapping controllers on Windows, Android and macOS.
![]() | |
---|---|
Platform | Note |
GX.games | On the GX.games target platform, this function will always return "none" for non-DirectInput devices |
gamepad_get_guid(index);
Argument | Type | Description |
---|---|---|
index | Real | Which gamepad "slot" index to check |
var _guid = gamepad_get_guid(global.PadIndex);
var _desc = gamepad_get_description(global.PadIndex);
global.GamepadID = _guid + "," + _desc;
The above code gets the GUID and name description strings, then concatenates them and stores the final string in a global variable for future reference.