optimiz3 / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

Important DirectInput differences between the native API and SlimDX #803

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi!

I´m using March 2011 version.

I know you have already talked about this in other issues, but we really need 
access to the native method: GetDeviceData (or GetBufferedData if you prefer, 
but with other return values)

Currently, you have hidden the GetDeviceData inside your  GetBufferedData, 
which returns a list of JoystickStates (or MouseStates, etc), making quite 
nasty to know what device object has actually changed. 

For me, it makes no sense to return full DeviceStates here, as only one field 
of the state will have data. This native DirectX functionality returns only the 
DIDEVICEOBJECTDATA structure, with the offset of the object that changed and 
the data. Why to create a full DeviceState structure from that (in the method 
CreateJoystickState)?? I really don´t get it... 

I think you should really fix this to make SlimDX match exactly the native 
DirectInput lib. 

Also, you didn´t include the possibility to get a DeviceObjectInformation by 
Offset. You have the other two options (by usage and by ID), but not by Offset, 
which complicates several things in our code. I have managed to pair 
Usage/UsagePages to Offsets inside the JoystickState structure, but it would 
definitely be helpful to have the "ByOffset" feature, which is included in the 
native libs.

I´ll be glad to help coding all of this if you need it.

Thanks a lot for your work. Best, 

Iñaki Ayucar

Original issue reported on code.google.com by iayucart...@gmail.com on 1 Jun 2011 at 4:34

GoogleCodeExporter commented 8 years ago
Fixed in r2079.

Original comment by Mike.Popoloski on 9 Jun 2011 at 3:57

GoogleCodeExporter commented 8 years ago

Original comment by Mike.Popoloski on 9 Jun 2011 at 3:57