Fix SDL Gamepad Button Mapping

Reporter: RobertBColton  |  Status: open  |  Last Modified: November 23, 2020, 11:27:42 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

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 (6613ccb) into master (cccbd89) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2165   +/-   ##
=======================================
  Coverage   33.03%   33.03%           
=======================================
  Files         197      197           
  Lines       19059    19059           
=======================================
  Hits         6296     6296           
  Misses      12763    12763           
Impacted Files Coverage Δ
ENIGMAsystem/SHELL/Platforms/SDL/Gamepad.cpp 5.78% <0.00%> (ø)

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...6613ccb. Read the comment docs.

Please sign in to post comments, or you can view this issue on GitHub.