J
JeZxLee
Guest
Hi,
Little confused...
How can we detect if one or more controller(s) is/are present?
The following code ran once on game start returns "0" when 2 USB controllers ARE plugged in on Win 10?
Any help would be appreciated, thanks!
Little confused...
How can we detect if one or more controller(s) is/are present?
The following code ran once on game start returns "0" when 2 USB controllers ARE plugged in on Win 10?
Code:
global.NumberOfGamepads = 0;
for (var index = 0; index < gamepad_get_device_count(); index++)
{
if ( gamepad_is_connected(index) ) global.NumberOfGamepads++;
}