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.




Argument Description
device Which gamepad "slot" to get the name of.






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));
      draw_text(32, 32 + (i * 32), "No Gamepad Connected");

The above code will loop through all the gamepad slots to check for connected devices and then draw some text to the screen based on whether a gamepad is connected to the slot or not.