Jump to content

  • Log In with Google      Sign In   
  • Create Account

DirectInput's awkward and inconsistent terminology.


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

#1 gasto   Members   -  Reputation: 261

Like
0Likes
Like

Posted 08 May 2014 - 11:40 AM

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, 08 May 2014 - 11:46 AM.

Intel Core 2 Quad CPU Q6600, 2.4 GHz. 3GB RAM. ATI Radeon HD 3400.

Sponsor:

#2 Pink Horror   Members   -  Reputation: 1201

Like
1Likes
Like

Posted 08 May 2014 - 01:45 PM

"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.



#3 Gavin Williams   Members   -  Reputation: 663

Like
0Likes
Like

Posted 16 May 2014 - 02:20 AM

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.



#4 mhagain   Crossbones+   -  Reputation: 7959

Like
1Likes
Like

Posted 16 May 2014 - 03:16 AM

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.


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.


#5 gasto   Members   -  Reputation: 261

Like
0Likes
Like

Posted 16 May 2014 - 07:33 PM

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.




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