diff options
author | Sam Lantinga <slouken@libsdl.org> | 2021-01-27 12:41:58 -0800 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2021-01-27 12:41:58 -0800 |
commit | 9583ad4a895dffd321b59ed1ed32081a77470810 (patch) | |
tree | 0014c3181d81b00880113b3107438632366183d1 /src/joystick/hidapi | |
parent | e982c9eada3ff37bb80febdba065f65f2515680a (diff) | |
download | sdl-9583ad4a895dffd321b59ed1ed32081a77470810.tar.gz |
Fixed compile warning
Diffstat (limited to 'src/joystick/hidapi')
-rw-r--r-- | src/joystick/hidapi/SDL_hidapi_stadia.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/joystick/hidapi/SDL_hidapi_stadia.c b/src/joystick/hidapi/SDL_hidapi_stadia.c index 019172602..a8797b7ae 100644 --- a/src/joystick/hidapi/SDL_hidapi_stadia.c +++ b/src/joystick/hidapi/SDL_hidapi_stadia.c @@ -222,7 +222,7 @@ HIDAPI_DriverStadia_HandleStatePacket(SDL_Joystick *joystick, SDL_DriverStadia_C #define READ_STICK_AXIS(offset) \ (data[offset] == 0x80 ? 0 : \ - (Sint16)HIDAPI_RemapVal(data[offset] - 0x80, 0x01 - 0x80, 0xff - 0x80, SDL_MIN_SINT16, SDL_MAX_SINT16)) + (Sint16)HIDAPI_RemapVal((float)(data[offset] - 0x80), 0x01 - 0x80, 0xff - 0x80, SDL_MIN_SINT16, SDL_MAX_SINT16)) { axis = READ_STICK_AXIS(4); SDL_PrivateJoystickAxis(joystick, SDL_CONTROLLER_AXIS_LEFTX, axis); |