Commit e45ef5a6c0b20349abd7c62b43d378ff460e9172

Sam Lantinga 2022-10-23T16:35:05

Merge commit '5b8f830e342b296d255969bbaec5a1a3522f1083' into main

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index cc29a72..5561afc 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -1530,7 +1530,8 @@ SDL_PrivateJoystickAxis(SDL_Joystick *joystick, Uint8 axis, Sint16 value)
     if (!info->sent_initial_value) {
         /* Make sure we don't send motion until there's real activity on this axis */
         const int MAX_ALLOWED_JITTER = SDL_JOYSTICK_AXIS_MAX / 80;  /* ShanWan PS3 controller needed 96 */
-        if (SDL_abs(value - info->value) <= MAX_ALLOWED_JITTER) {
+        if (SDL_abs(value - info->value) <= MAX_ALLOWED_JITTER &&
+            !SDL_IsJoystickVirtual(joystick->guid)) {
             return 0;
         }
         info->sent_initial_value = SDL_TRUE;