adds missing button for wii-u pro gamepad, DPAD_RIGHT #8285
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Arch Linux with a bluetooth wii-u pro controller, I ran into an issue where the DPAD_RIGHT did not detect input and could not be set for use. I was sure the button/input was working. This is likely related to #5526 (closed).
It turns out the SDLJoyButtonMapping maps a limited number of buttons(when not _WIN32) only goes 0 through 15, and this was the indexed 16 button. This simple addition allows JoyButton index 16 to be mapped.
There's potential for further refinement (not part of this pull request), but at the risk of breaking a load of an older controls.ini file... NKCODEs are still mismatched in linux (360 controller and wii-u pro gamepad), but they were not changed to so that a user's controls.ini will load correctly. 0-4 are not DPAD for either the wii-u pro controller or the xbox360 controller, they actually 13-16. At the risk of screwing up someone's load of controls.ini, a more appropriate mapping would be
index 8 and 9 are SELECT and START on the wiiu pro controller, but are different for a 360 controller. So I thought it better to go with NKCODE_BUTTON with this proposal.