mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
Fixed mapping third party XBox controllers that have the trigger axis all the way in until they are pulled and get updated values.
This commit is contained in:
parent
4026980917
commit
7b680a2ab7
@ -232,7 +232,7 @@ WatchJoystick(SDL_Joystick * joystick)
|
||||
if (SDL_PollEvent(&event)) {
|
||||
switch (event.type) {
|
||||
case SDL_JOYAXISMOTION:
|
||||
if (event.jaxis.value > 20000 || event.jaxis.value < -20000) {
|
||||
if ((event.jaxis.value > 20000 || event.jaxis.value < -20000) && event.jaxis.value != -32768) {
|
||||
for (_s = 0; _s < s; _s++) {
|
||||
if (steps[_s].axis == event.jaxis.axis) {
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user