Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


DirectInput, multiple joysticks, multiple users


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 obermeister   Members   -  Reputation: 104

Like
0Likes
Like

Posted 06 May 2014 - 12:00 PM

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.



Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS