Closed mardy closed 5 months ago
I honestly think we should just consolidate these files rather than repeating the code like this.
I will try to consolidate the two files for SDL2 (there will be quite a few ifdef
s...), then we can see if it's worth to do the same for SDL1.2.
But in any case, this is the code we have right now, and it's wrong :-)
These two axes values are unsigned, and all 8 bits can be used; therefore, in order to reach SHRT_MAX we only need to shift them by 7 bits, not 8. This avoids having the value wrap down to zero midway.