• Advertisement
Sign in to follow this  

DirectInput's awkward and inconsistent terminology.

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

In the first paragraphs of the introduction to DirectInput by Microsoft:
 

Device object
Code representing a key, button, trigger, and so on found on a DirectInput device object. Also called device object instance.


Yet, everywhere around the site one finds references to device objects as if they were DirectInput devices(keyboards, mice, joypads, joysticks, etc.) For example in the EnumDevices method explanation:
 

dwDevType
Device type filter.
To restrict the enumeration to a particular type of device, set this parameter to a DI8DEVTYPE_* value. See DIDEVICEINSTANCE.

Edited by gasto

Share this post


Link to post
Share on other sites
Advertisement

"Device object" on that page looks like a typo for "Device constant". I don't think the API is that awkward compared to anything else from Microsoft, though apparently the documentation could use some editing, which also isn't that unusual for Microsoft.

Share this post


Link to post
Share on other sites

I mentioned this in another post, but you shouldn't use DirectInput as stated here : http://msdn.microsoft.com/en-us/library/windows/desktop/ee416842%28v=vs.85%29.aspx

 

"The use of DirectInput for keyboard and mouse input is not recommended. You should use Windows messages instead."

 

You can also use raw-input.

Share this post


Link to post
Share on other sites

I mentioned this in another post, but you shouldn't use DirectInput as stated here : http://msdn.microsoft.com/en-us/library/windows/desktop/ee416842%28v=vs.85%29.aspx

 

"The use of DirectInput for keyboard and mouse input is not recommended. You should use Windows messages instead."

 

You can also use raw-input.

 

Per the OP's previous posts he appears to be using it for joysticks.

Share this post


Link to post
Share on other sites
Yes, Direct Input for joysticks and Windows messages for traditional keyboard and mouse. However if I want to cover Xbox 360 controllers I must use Xinput as well.

I think that all three of them support immediate events and buffered input.

I recently played a Tiny Brains demo on Stream and it seemed to possess no support for DirecInput because the y axis on the left joystick(or so reported in the driver's utility) was inverted, and the right joystick seemed to partially work only for the left hemisphere of rotation, which makes me think that Xinput misrepresents classic USB controllers.

Share this post


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

  • Advertisement