Fix SDL Gamepad Button Mapping
Reporter: RobertBColton | Status: closed | Last Modified: December 11, 2020, 05:45:40 pm Addresses #2129 in support of user. We basically need a map of SDL button constants aligned to our own.
https://wiki.libsdl.org/SDL_GameControllerButton
https://wiki.libsdl.org/SDL_GameControllerButton
I do the same thing in the XInput extension, except the map is inverted since my gamepad struct holds XInput state. I am not sure if honestly we could just make a generalized structure and reuse it in all of the places. I don't know what's better, converting to or from.
The SDL gamepads also need additional work yet such as threshold for other buttons and stuff.
codecov[bot]
Codecov Report
Merging #2165 (451edc5) into master (cccbd89) will increase coverage by
0.34%
.
The diff coverage is0.00%
.
@@ Coverage Diff @@
## master #2165 +/- ##
==========================================
+ Coverage 33.03% 33.38% +0.34%
==========================================
Files 197 197
Lines 19059 19161 +102
==========================================
+ Hits 6296 6396 +100
- Misses 12763 12765 +2
Impacted Files | Coverage Δ | |
---|---|---|
ENIGMAsystem/SHELL/Platforms/SDL/Gamepad.cpp | 5.64% <0.00%> (-0.14%) |
⬇️ |
...GMAsystem/SHELL/Universal_System/image_formats.cpp | 86.41% <0.00%> (+6.41%) |
⬆️ |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update cccbd89...451edc5. Read the comment docs.
Leave a commentView this issue on GitHub
Please sign in to post comments, or you can view this issue on GitHub.