Commit bec9d740ecceaedb5e7a4f7aaa31a01af2579f00

Sam Lantinga 2021-01-27T12:41:58

Fixed compile warning

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/joystick/hidapi/SDL_hidapi_stadia.c b/src/joystick/hidapi/SDL_hidapi_stadia.c
index 0191726..a8797b7 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);