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 exclusive access to joypad.


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
2 replies to this topic

#1 gasto   Members   -  Reputation: 300

Like
0Likes
Like

Posted 04 May 2014 - 08:27 AM

I am confused about the semantics of the following paragraph from microsoft's documentation

DISCL_EXCLUSIVE
The application requires exclusive access. If exclusive access is granted, no other instance of the device can obtain exclusive access to the device while it is acquired. However, nonexclusive access to the device is always permitted, even if another application has obtained exclusive access. An application that acquires the mouse or keyboard device in exclusive mode should always unacquire the devices when it receives WM_ENTERSIZEMOVE and WM_ENTERMENULOOP messages. Otherwise, the user cannot manipulate the menu or move and resize the window.


How can an instance have non exclusive access to a device when another instance is having exclusive access to it?
Intel Core 2 Quad CPU Q6600, 2.4 GHz. 3GB RAM. ATI Radeon HD 3400.

Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 8966

Like
1Likes
Like

Posted 04 May 2014 - 09:04 AM

This is confusing terminology rather than confusing behaviour.  It's called "exclusive" but that's just a name and unfortunately the name doesn't describe the behaviour (it may have done in older versions of DI, and perhaps the names were retained for consistency even if they no longer make sense: that's unfortunate but it sometimes happens).

 

The basic rules are:

  • Only one instance of a device type may have "exclusive" access.
  • Any number of instances of a device type may have "non-exclusive" access.
  • And both of these are always true.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 gasto   Members   -  Reputation: 300

Like
0Likes
Like

Posted 04 May 2014 - 08:20 PM

So, it is some kind of fetish. It looks cool to set a flag that activates the exclusive use of that flag, but serves no purpose practically, because all other applications will be able to access the device.
Intel Core 2 Quad CPU Q6600, 2.4 GHz. 3GB RAM. ATI Radeon HD 3400.




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