gamepad_get_description(device);
Argument | Description |
---|---|
device | Which gamepad "slot" to get the name of. |
Returns: String
This function will return a string with the description of the
given gamepad, for example, a PS3 controller may return a string
similar to "PLAYSTATION(R)3 Controller", or an XBox360 controller
could return "Xbox 360 Controller (XInput STANDARD GAMEPAD)". This
string is hardware dependant and the returned value will depend on
the gamepad plugged into the device "slot" that is being
checked.
var gp_num = gamepad_get_device_count();
for (var i = 0; i < gp_num; i++;)
{
if gamepad_is_connected(i)
{
draw_text(32, 32 + (i * 32),
gamepad_get_description(i));
}
else
{
draw_text(32, 32 + (i * 32),
"No Gamepad Connected");
}
}