• Advertisement
Sign in to follow this  

XInput not working with multiple controllers

This topic is 3574 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...
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?

Share this post


Link to post
Share on other sites
Advertisement
FYI for anyone else looking for a solution on this...

It turns out the DirectX SDK I was using was busted. I upgraded to the latest version (March 08) and now all the controllers work.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement