diff options
author | Sam Lantinga <slouken@libsdl.org> | 2021-02-06 15:43:17 -0800 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2021-02-06 15:43:17 -0800 |
commit | 476ae52b27255f8c558220bf5d7739585a0f5e86 (patch) | |
tree | 2e8d128c70857f7f2c2dd81a75a7b042cadcefbf | |
parent | ea7dd370dbf04e52cf6d731fa1d4d0f954646ab2 (diff) | |
download | sdl-476ae52b27255f8c558220bf5d7739585a0f5e86.tar.gz |
SDL: fix packet handling for original version of Stadia FW
-rw-r--r-- | src/joystick/hidapi/SDL_hidapi_stadia.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/joystick/hidapi/SDL_hidapi_stadia.c b/src/joystick/hidapi/SDL_hidapi_stadia.c index 7bf47313e..e11d249e6 100644 --- a/src/joystick/hidapi/SDL_hidapi_stadia.c +++ b/src/joystick/hidapi/SDL_hidapi_stadia.c @@ -152,7 +152,8 @@ HIDAPI_DriverStadia_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverStadia_C { Sint16 axis; - if (size < 11 || data[0] != 0x03) { + // The format is the same but the original FW will send 10 bytes and January '21 FW update will send 11 + if (size < 10 || data[0] != 0x03) { /* We don't know how to handle this report */ return; } |