mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2025-02-26 05:25:34 +00:00
Fixed PS3 accelerometer values on little endian systems
This commit is contained in:
parent
d1e9015639
commit
babaa7d2bd
@ -318,6 +318,8 @@ HIDAPI_DriverPS3_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device, SDL_Joysti
|
||||
static float
|
||||
HIDAPI_DriverPS3_ScaleAccel(Sint16 value)
|
||||
{
|
||||
/* Accelerometer values are in big endian order */
|
||||
value = SDL_SwapBE16(value);
|
||||
return (float)(value - 511) / 113.0f;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user