Path: blob/master/thirdparty/sdl/patches/0002-msvc-constants-fpstrict.patch
9898 views
diff --git a/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps4.c b/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps4.c1index 7404bf2268..a697cdf6d9 1006442--- a/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps4.c3+++ b/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps4.c4@@ -1003,8 +1003,8 @@ static bool HIDAPI_DriverPS4_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device56static void HIDAPI_DriverPS4_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS4_Context *ctx, PS4StatePacket_t *packet, int size)7{8- static const float TOUCHPAD_SCALEX = 1.0f / 1920;9- static const float TOUCHPAD_SCALEY = 1.0f / 920; // This is noted as being 944 resolution, but 920 feels better10+ static const float TOUCHPAD_SCALEX = 5.20833333e-4f; // 1.0f / 192011+ static const float TOUCHPAD_SCALEY = 1.08695652e-3f; // 1.0f / 920 // This is noted as being 944 resolution, but 920 feels better12Sint16 axis;13bool touchpad_down;14int touchpad_x, touchpad_y;15diff --git a/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps5.c b/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps5.c16index abf59a87f2..a486af6b0f 10064417--- a/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps5.c18+++ b/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps5.c19@@ -1355,8 +1355,8 @@ static void HIDAPI_DriverPS5_HandleStatePacketCommon(SDL_Joystick *joystick, SDL2021static void HIDAPI_DriverPS5_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS5_Context *ctx, PS5StatePacket_t *packet, Uint64 timestamp)22{23- static const float TOUCHPAD_SCALEX = 1.0f / 1920;24- static const float TOUCHPAD_SCALEY = 1.0f / 1070;25+ static const float TOUCHPAD_SCALEX = 5.20833333e-4f; // 1.0f / 192026+ static const float TOUCHPAD_SCALEY = 9.34579439e-4f; // 1.0f / 107027bool touchpad_down;28int touchpad_x, touchpad_y;2930@@ -1406,8 +1406,8 @@ static void HIDAPI_DriverPS5_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_d3132static void HIDAPI_DriverPS5_HandleStatePacketAlt(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS5_Context *ctx, PS5StatePacketAlt_t *packet, Uint64 timestamp)33{34- static const float TOUCHPAD_SCALEX = 1.0f / 1920;35- static const float TOUCHPAD_SCALEY = 1.0f / 1070;36+ static const float TOUCHPAD_SCALEX = 5.20833333e-4f; // 1.0f / 192037+ static const float TOUCHPAD_SCALEY = 9.34579439e-4f; // 1.0f / 107038bool touchpad_down;39int touchpad_x, touchpad_y;40414243