Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement GetObjectPropertiesById #393

Closed
CasualPokePlayer opened this issue Apr 12, 2023 · 1 comment · Fixed by #394
Closed

Implement GetObjectPropertiesById #393

CasualPokePlayer opened this issue Apr 12, 2023 · 1 comment · Fixed by #394

Comments

@CasualPokePlayer
Copy link
Contributor

CasualPokePlayer commented Apr 12, 2023

I'm currently working on switching the BizHawk project over from SlimDX over to Vortice for most of our DirectX methods, and I've run into a small issue. We had normally used GetObjectPropertiesById in order to obtain properties of joystick objects, although that method is not implemented on your side. GetObjectPropertiesByName appeared to be a suitable alternative, except for a small problem. We used GetObjects in order to obtain all the joystick objects, and the objects there have localized names. So this ends up crashing for non-English users (one of our devs testing this had crashes due to them being German).

I'd propose implementing a GetObjectPropertiesByOffset, which just takes in a raw offset, which a device object obtained with GetObjects would have and would be mostly the same method, just skipping the lookup with the name for the offset.

EDIT: On more examination, the offset from GetObjects is not the same as the offset expected to be sent through. Having GetObjectPropertiesById implemented (like what our project was using with SlimDX), would probably be the proper solution.

@CasualPokePlayer CasualPokePlayer changed the title Implement GetObjectPropertiesByOffset Implement GetObjectPropertiesById Apr 13, 2023
@amerkoleci
Copy link
Owner

Feel free to submit PR!

Thanks

CasualPokePlayer added a commit to CasualPokePlayer/Vortice.Windows that referenced this issue Apr 13, 2023
CasualPokePlayer added a commit to CasualPokePlayer/Vortice.Windows that referenced this issue Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants