• Advertisement
Sign in to follow this  

DirectInput exclusive access to joypad.

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

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?

Share this post


Link to post
Share on other sites
Advertisement

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.

Share this post


Link to post
Share on other sites
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.

Share this post


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

  • Advertisement