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

XboxInput: XboxInputState requires an extra field for XInputGetStateEx. #2018

Closed
mkrautz opened this issue Dec 24, 2015 · 0 comments
Closed

Comments

@mkrautz
Copy link
Contributor

mkrautz commented Dec 24, 2015

The crash at #2016 is due to us using a struct meant to be used for XInputGetState() even when calling XInputGetStateEx().

Thanks to @hacst for figuring it out via http://www.libsdl.org/tmp/SDL/src/core/windows/SDL_xinput.h

We should simply add a padding uint32_t at the end, to make it work for both cases:

[...]
uint32_t padding; // XInputGetStateEx() requires a larger struct than XInputGetState()
[...]
hacst added a commit to hacst/mumble that referenced this issue Dec 24, 2015
The XboxInputState structure we used was only compatible
to the XInputGetState function. The undocumented
XboxInputStateEx function we prefer requires additional
padding at the end of the structure.

Fixes mumble-voip#2018
Fixes mumble-voip#2016
@hacst hacst closed this as completed in c2bbcd5 Dec 24, 2015
mkrautz pushed a commit to mkrautz/mumble that referenced this issue Mar 4, 2016
The XboxInputState structure we used was only compatible
to the XInputGetState function. The undocumented
XboxInputStateEx function we prefer requires additional
padding at the end of the structure.

Fixes mumble-voip#2018
Fixes mumble-voip#2016

(cherry picked from commit c2bbcd5)
mkrautz pushed a commit to mkrautz/mumble that referenced this issue Mar 4, 2016
The XboxInputState structure we used was only compatible
to the XInputGetState function. The undocumented
XboxInputStateEx function we prefer requires additional
padding at the end of the structure.

Fixes mumble-voip#2018
Fixes mumble-voip#2016

(cherry picked from commit c2bbcd5)
mkrautz pushed a commit to mkrautz/mumble that referenced this issue Mar 4, 2016
The XboxInputState structure we used was only compatible
to the XInputGetState function. The undocumented
XboxInputStateEx function we prefer requires additional
padding at the end of the structure.

Fixes mumble-voip#2018
Fixes mumble-voip#2016

(cherry picked from commit c2bbcd5)
mkrautz pushed a commit to mkrautz/mumble that referenced this issue Mar 4, 2016
The XboxInputState structure we used was only compatible
to the XInputGetState function. The undocumented
XboxInputStateEx function we prefer requires additional
padding at the end of the structure.

Fixes mumble-voip#2018
Fixes mumble-voip#2016

(cherry picked from commit c2bbcd5)
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

No branches or pull requests

1 participant