Browse Source

Fixed compile warning

Sam Lantinga 4 years ago
parent
commit
2e8e3854b8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/joystick/hidapi/SDL_hidapi_ps4.c

+ 1 - 1
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;
     }