for (int i=0; i<4; i++)
{
XINPUT_STATE temp;
memset(&temp, 0, sizeof(XINPUT_STATE));
DWORD result = XInputGetState(i, &temp);
if (result == ERROR_SUCCESS)
{
// controller available
}
}
Like I said, index 0 returns a result of 0 and can successfully get the controller's state. All other controllers (1-3) just return error code 1167... ERROR_DEVICE_NOT_CONNECTED.
In Vista's gamepad manager, all controllers show up correctly and I can test them all with no problems. I'm using a USB wireless receiver to connect the controllers.
Any ideas?
XInput not working with multiple controllers
I've got an odd problem... XInput works, but only for one controller. For everything else it just gives me a ERROR_DEVICE_NOT_CONNECTED error. Code is rather basic, I'm just checking to see if the controller is there...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement