mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
17 lines
477 B
Diff
17 lines
477 B
Diff
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
|
|
index 083b017..a4c36db 100644
|
|
--- a/src/joystick/SDL_joystick.c
|
|
+++ b/src/joystick/SDL_joystick.c
|
|
@@ -438,6 +438,11 @@ int SDL_PrivateJoystickAxis(SDL_Joystick *joystick, Uint8 axis, Sint16 value)
|
|
return 0;
|
|
}
|
|
|
|
+ /* Don't update if we're in the dead zone */
|
|
+ if ( value == 0 && joystick->axes[axis] == 0 ) {
|
|
+ return 0;
|
|
+ }
|
|
+
|
|
/* Update internal joystick state */
|
|
joystick->axes[axis] = value;
|
|
|