Sign in to follow this  
marshdabeachy

XInput not working with multiple controllers

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this