Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

PropertyAccessor.Set method not implemented #152

Closed
plextoriano opened this issue Sep 5, 2013 · 10 comments
Closed

PropertyAccessor.Set method not implemented #152

plextoriano opened this issue Sep 5, 2013 · 10 comments
Assignees

Comments

@plextoriano
Copy link

Hi, I need to normalize the values ​​returned by the axis. This would use the Set method (http://sharpdx.org/documentation/api/m-sharpdx-directinput-propertyaccessor-set-2). I use API version 2.5.0.0

But I see that it is not implemented. Is it normal?

Thanks

@ArtiomCiumac
Copy link
Contributor

What do you mean by "not implemented"? The method you specified has implementation, along with all its overloads.

@ghost ghost assigned ArtiomCiumac Sep 5, 2013
@plextoriano
Copy link
Author

Hi Artion,

Yes, is is implemented, but the Set methos in
_DirectInput.PropertyAccessor_is protected:

protected unsafe void Set(IntPtr guid, InputRange value)

then when I instantiate a *DeviceProperties *object not is shown as method.

Example:
.....
Joystick joystick = new Joystick(directInput, joystickGuid);
joystick.Properties.BufferSize = 128;

joystick.Properties.Set(..* <--- Not is public !!*
....

I think this issue happens in most cases of this class.

Best Regards.

2013/9/5 Artiom Ciumac notifications@github.com

What do you mean by "not implemented"? The methodhttps://github.com/sharpdx/SharpDX/blob/master_integration/Source/SharpDX.DirectInput/PropertyAccessor.cs#L192you specified has implementation, along with all its overloads.


Reply to this email directly or view it on GitHubhttps://github.com//issues/152#issuecomment-23845324
.

@xoofx
Copy link
Member

xoofx commented Sep 5, 2013

These methods are hidden because DeviceProperties should provide explicit properties get/set for all supported properties (it is using ProperttyAccessor methods internally). Question is: Which property you are trying accessing that is not accessible from a get/set property in DeviceProperties directly?

@plextoriano
Copy link
Author

Hi,

Specifically to :

*protected unsafe void Set(IntPtr guid, InputRange value)

I intend to normalize the values returned by the axes of the joysticks to
a particular range.*
*

Regards,
Mario

2013/9/5 xoofx notifications@github.com

These methods are hidden because DeviceProperties should provide explicit
properties get/set for all supported properties (it is using
ProperttyAccessor methods internally). Question is: Which property you are
trying accessing that is not accessible from a get/set property in
DeviceProperties directly?


Reply to this email directly or view it on GitHubhttps://github.com//issues/152#issuecomment-23849148
.

@xoofx
Copy link
Member

xoofx commented Sep 5, 2013

I understand, but which GUID is it?

@xoofx
Copy link
Member

xoofx commented Sep 5, 2013

Ah, there is no setter on DeviceProperties.Range, this is what you are looking for? I guess it should be fixable directly without exposing PropertyAccessor method. Not sure why It was not exposed in the first place.

@plextoriano
Copy link
Author

Yes.. Is this exactly!!

In the next SharpDX revision, will it be corrected?
When is expected the next revision or binaries compiled in GitHub?

Regards,
Mario

2013/9/5 xoofx notifications@github.com

Ah, there is no setter on DeviceProperties.Range, this is what you are
looking for? I guess it should be fixable directly without exposing
PropertyAccessor method. Not sure why It was not exposed in the first place.


Reply to this email directly or view it on GitHubhttps://github.com//issues/152#issuecomment-23849774
.

@ArtiomCiumac
Copy link
Contributor

I can fix it during this day, as soon as I will get some time.

@plextoriano
Copy link
Author

OK

I'll be watching the github repository for changes.

Thanks for all.

Mario

2013/9/5 Artiom Ciumac notifications@github.com

I can fix it during this day, as soon as I will get some time.


Reply to this email directly or view it on GitHubhttps://github.com//issues/152#issuecomment-23854681
.

@ArtiomCiumac
Copy link
Contributor

The issue should be fixed now.
The changes will be included into the latest dev package once they get in the master branch.
Be aware that the setter may throw exception, as this property can be readonly for some devices, as stated on MSDN for the 'DIPROP_RANGE' GUID.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants