From 2e8e3854b8ea9db83cc75515f778bf5b5a097772 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 21 Nov 2020 17:59:15 -0800 Subject: [PATCH] Fixed compile warning --- src/joystick/hidapi/SDL_hidapi_ps4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/joystick/hidapi/SDL_hidapi_ps4.c b/src/joystick/hidapi/SDL_hidapi_ps4.c index e4056fd28..1bb753d92 100644 --- a/src/joystick/hidapi/SDL_hidapi_ps4.c +++ b/src/joystick/hidapi/SDL_hidapi_ps4.c @@ -366,7 +366,7 @@ HIDAPI_DriverPS4_ApplyCalibrationData(SDL_DriverPS4_Context *ctx, int index, Sin /* Convert the raw data to the units expected by SDL */ if (index < 3) { - result = (result / GYRO_RES_PER_DEGREE) * M_PI / 180.0f; + result = (result / GYRO_RES_PER_DEGREE) * (float)M_PI / 180.0f; } else { result = (result / ACCEL_RES_PER_G) * SDL_STANDARD_GRAVITY; }