DirectInput's awkward and inconsistent terminology.

Started by
3 comments, last by gasto 9 years, 11 months ago
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.

Intel Core 2 Quad CPU Q6600, 2.4 GHz. 3GB RAM. ATI Radeon HD 3400.
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.

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.

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.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

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.
Intel Core 2 Quad CPU Q6600, 2.4 GHz. 3GB RAM. ATI Radeon HD 3400.

This topic is closed to new replies.

Advertisement