Removed SDL_stdinc.h dependency on HAVE_M_PI, added SDL_M_PIl (double) and SDL_M_PIf (float) instead

This commit is contained in:
Sam Lantinga
2022-11-25 10:33:37 -08:00
parent 8733927e35
commit 670f1df469
16 changed files with 38 additions and 44 deletions

View File

@@ -1192,9 +1192,9 @@ static void HandleMotionPlusData(SDL_DriverWii_Context *ctx, SDL_Joystick *joyst
z *= 2000;
}
values[0] = -((float)z / GYRO_RES_PER_DEGREE) * (float)M_PI / 180.0f;
values[1] = ((float)x / GYRO_RES_PER_DEGREE) * (float)M_PI / 180.0f;
values[2] = ((float)y / GYRO_RES_PER_DEGREE) * (float)M_PI / 180.0f;
values[0] = -((float)z / GYRO_RES_PER_DEGREE) * SDL_M_PIf / 180.0f;
values[1] = ((float)x / GYRO_RES_PER_DEGREE) * SDL_M_PIf / 180.0f;
values[2] = ((float)y / GYRO_RES_PER_DEGREE) * SDL_M_PIf / 180.0f;
SDL_PrivateJoystickSensor(joystick, SDL_SENSOR_GYRO, 0, values, 3);
}
}