Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/sdl/patches/0002-msvc-constants-fpstrict.patch
9898 views
1
diff --git a/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps4.c b/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps4.c
2
index 7404bf2268..a697cdf6d9 100644
3
--- a/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps4.c
4
+++ b/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps4.c
5
@@ -1003,8 +1003,8 @@ static bool HIDAPI_DriverPS4_SetJoystickSensorsEnabled(SDL_HIDAPI_Device *device
6
7
static void HIDAPI_DriverPS4_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS4_Context *ctx, PS4StatePacket_t *packet, int size)
8
{
9
- static const float TOUCHPAD_SCALEX = 1.0f / 1920;
10
- static const float TOUCHPAD_SCALEY = 1.0f / 920; // This is noted as being 944 resolution, but 920 feels better
11
+ static const float TOUCHPAD_SCALEX = 5.20833333e-4f; // 1.0f / 1920
12
+ static const float TOUCHPAD_SCALEY = 1.08695652e-3f; // 1.0f / 920 // This is noted as being 944 resolution, but 920 feels better
13
Sint16 axis;
14
bool touchpad_down;
15
int touchpad_x, touchpad_y;
16
diff --git a/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps5.c b/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps5.c
17
index abf59a87f2..a486af6b0f 100644
18
--- a/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps5.c
19
+++ b/thirdparty/sdl/joystick/hidapi/SDL_hidapi_ps5.c
20
@@ -1355,8 +1355,8 @@ static void HIDAPI_DriverPS5_HandleStatePacketCommon(SDL_Joystick *joystick, SDL
21
22
static void HIDAPI_DriverPS5_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS5_Context *ctx, PS5StatePacket_t *packet, Uint64 timestamp)
23
{
24
- static const float TOUCHPAD_SCALEX = 1.0f / 1920;
25
- static const float TOUCHPAD_SCALEY = 1.0f / 1070;
26
+ static const float TOUCHPAD_SCALEX = 5.20833333e-4f; // 1.0f / 1920
27
+ static const float TOUCHPAD_SCALEY = 9.34579439e-4f; // 1.0f / 1070
28
bool touchpad_down;
29
int touchpad_x, touchpad_y;
30
31
@@ -1406,8 +1406,8 @@ static void HIDAPI_DriverPS5_HandleStatePacket(SDL_Joystick *joystick, SDL_hid_d
32
33
static void HIDAPI_DriverPS5_HandleStatePacketAlt(SDL_Joystick *joystick, SDL_hid_device *dev, SDL_DriverPS5_Context *ctx, PS5StatePacketAlt_t *packet, Uint64 timestamp)
34
{
35
- static const float TOUCHPAD_SCALEX = 1.0f / 1920;
36
- static const float TOUCHPAD_SCALEY = 1.0f / 1070;
37
+ static const float TOUCHPAD_SCALEX = 5.20833333e-4f; // 1.0f / 1920
38
+ static const float TOUCHPAD_SCALEY = 9.34579439e-4f; // 1.0f / 1070
39
bool touchpad_down;
40
int touchpad_x, touchpad_y;
41
42
43