P
pixelkitty
Guest
Hi. Was hoping someone could help. I'm trying to test my gamepad control code, and I can't get GMS to detect DirectInput controllers. Tested with both my PS4 gamepad connected by bluetooth, and a SmartJoy USB adapter for a PS2 controller.
I know about Xinput vs DirectInput slots, but that doesn't seem to be the issue. I check gamepad_get_device_count, and get 12 slots, as expected in windows. Then I loop through checking gamepad_is_connected(i) for 0-11, and I get false on every slot. No gamepad found.
But the system detects it. USB controller config sees them fine. Other games see them fine. So, I'm kind of stumped. Any ideas?
Tested with XBOne controller with adapter, works fine detected on slot 0.
Windows 10. Latest GMS 1.4.
Relevant code:
for (var i = 0; i < gamepad_get_device_count(); i++)
{
show_debug_message("checking slot " + string(i));
if (gamepad_is_connected(i))
{
show_debug_message("Slot " + string(i) + " was connected. Creating instance.");
//create gamepad object instance code removed for brevity
}
else
{
show_debug_message("Slot " + string(i) + " was not found");
}
}
I know about Xinput vs DirectInput slots, but that doesn't seem to be the issue. I check gamepad_get_device_count, and get 12 slots, as expected in windows. Then I loop through checking gamepad_is_connected(i) for 0-11, and I get false on every slot. No gamepad found.
But the system detects it. USB controller config sees them fine. Other games see them fine. So, I'm kind of stumped. Any ideas?
Tested with XBOne controller with adapter, works fine detected on slot 0.
Windows 10. Latest GMS 1.4.
Relevant code:
for (var i = 0; i < gamepad_get_device_count(); i++)
{
show_debug_message("checking slot " + string(i));
if (gamepad_is_connected(i))
{
show_debug_message("Slot " + string(i) + " was connected. Creating instance.");
//create gamepad object instance code removed for brevity
}
else
{
show_debug_message("Slot " + string(i) + " was not found");
}
}
Last edited by a moderator: