mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-03-06 19:29:55 +00:00
Report PS3 accelerometer values in m/s2 instead of Gs
(cherry picked from commit 0467301baf57389d96fafbe169fb07f4c10169bc)
This commit is contained in:
parent
535ec1a921
commit
120bc77e91
|
@ -311,7 +311,7 @@ static float HIDAPI_DriverPS3_ScaleAccel(Sint16 value)
|
||||||
{
|
{
|
||||||
/* Accelerometer values are in big endian order */
|
/* Accelerometer values are in big endian order */
|
||||||
value = SDL_SwapBE16(value);
|
value = SDL_SwapBE16(value);
|
||||||
return (float)(value - 511) / 113.0f;
|
return ((float)(value - 511) / 113.0f) * SDL_STANDARD_GRAVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HIDAPI_DriverPS3_HandleMiniStatePacket(SDL_Joystick *joystick, SDL_DriverPS3_Context *ctx, Uint8 *data, int size)
|
static void HIDAPI_DriverPS3_HandleMiniStatePacket(SDL_Joystick *joystick, SDL_DriverPS3_Context *ctx, Uint8 *data, int size)
|
||||||
|
|
Loading…
Reference in a new issue