gamepad_get_guid

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.

 

Syntax:

gamepad_get_guid(index);

Argument Description
index Which gamepad "slot" index to check

 

Returns:

String

 

Example:

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.