xbox controller index?
I've grabbed the code from here to determine if a joystick is a xbox controller, is there a way i can modify this code to determine what the controller index is for use with xinput?
ops, here's the link:
http://msdn.microsoft.com/en-us/library/bb173051(VS.85).aspx
I haven't done a lot with XInput but could you use the XInputGetState() method? It's part of the XInput.lib library. It accepts a number (controller index, 0-3) and returns a state.
Documentation
Documentation
that will just get the device state, what i need is a index for the controller for use with xinput that corresponds to a direct input device.
so my direct input code enumerates all joysticks/controllers and when it finds a xbox controller (which i can do using that code from the URL posted) i then need its index.
so my direct input code enumerates all joysticks/controllers and when it finds a xbox controller (which i can do using that code from the URL posted) i then need its index.
Quote:Original post by supagu
I've grabbed the code from here to determine if a joystick is a xbox controller, is there a way i can modify this code to determine what the controller index is for use with xinput?
DirectInput and XInput are two seperate APIs. Why do you need to do this?
Great tool to work with the xbox controller on pc can be found at this link:
http://www.redcl0ud.com/xbcd.html
There's also code available which might be useful.
http://www.redcl0ud.com/xbcd.html
There's also code available which might be useful.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement