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

[UWP] XInput forcibly uses old joystick mapping for all WinRT configurations #2720

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.1
Reported for operating system, platform: Windows 10, All

Comments on the original bug report:

On 2017-11-14 18:34:12 +0000, Ethan Lee wrote:

For WinRT, XInput always forces the old code path for all versions:

https://hg.libsdl.org/SDL/file/cf166abbde4a/src/joystick/windows/SDL_xinputjoystick.c#l39

Looking around briefly it seems this might have been required for Windows 8 (?), but I think for Windows 10 the new path is required. In its current form, ABXY is unintentionally mapped to the physical d-pad due to this array:

https://hg.libsdl.org/SDL/file/cf166abbde4a/src/joystick/windows/SDL_xinputjoystick.c#l349

By changing the hardcoded return value to SDL_FALSE, we use the new path where the array properly lines up...

https://hg.libsdl.org/SDL/file/cf166abbde4a/src/joystick/windows/SDL_xinputjoystick.c#l375

... and the issue is resolved for me.

On 2018-02-21 17:44:19 +0000, Ethan Lee wrote:

Created attachment 3177
Patch to fix Win10 XInput binding

Attached is a patch to fix this issue without changing the behavior on Windows 8, which presumably needed the old path to begin with.

On 2018-02-21 18:16:49 +0000, Ryan C. Gordon wrote:

This patch is now https://hg.libsdl.org/SDL/rev/1a033404c88b, thanks!

(note the commit hash changed because of Windows newlines, so be careful when updating your local copy.)

--ryan.

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