• Advertisement
Sign in to follow this  

DirectInput, multiple joysticks, multiple users

This topic is 1354 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

My situation is that I have multiple joystick input devices, from the same manufacturer.  The idea is that you set them up once, and then any user could log in and play without having to set them up again.  The problem is how to uniquely identify each stick so at runtime you associate each stick to the correct saved configuration.  I'm using DirectInput since these are joysticks, not gamepads.

 

The problem is that despite what is claimed here as well as other MSDN pages, the InstanceGUID is only unique per user, not per machine!  At least this is what I am seeing, which seems to be corroberated by one other poor sap here.  Ideally I want a new user to be able to log in and just run with the existing setup, but I don't see any way to associate the correct joystick to the correct saved button mapping without a reliable GUID that doesn't change (and that isn't the same for both sticks, like the product GUID). 

 

All these sticks are USB joysticks if that helps.

 

Maybe there's a way to reliably enumerate the sticks?  But without understanding the underlying architecture of how the USB ports are scanned for Joysticks, I'm not sure if I can always assume the "first" stick will actually be the first for every user, or if I unplug a stick and plug it back in, even to the same port.

Share this post


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

  • Advertisement