SDL: Fixed gyro values for the Armor-X Pro controller

From 8df7b4d8539338121b1e34e29f331b28f1f4ff05 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 28 Mar 2023 14:44:28 -0700
Subject: [PATCH] Fixed gyro values for the Armor-X Pro controller

---
 src/joystick/hidapi/SDL_hidapi_ps4.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/joystick/hidapi/SDL_hidapi_ps4.c b/src/joystick/hidapi/SDL_hidapi_ps4.c
index 0b096c3cbef8..ceb9a14ab07f 100644
--- a/src/joystick/hidapi/SDL_hidapi_ps4.c
+++ b/src/joystick/hidapi/SDL_hidapi_ps4.c
@@ -601,13 +601,15 @@ static void HIDAPI_DriverPS4_LoadCalibrationData(SDL_HIDAPI_Device *device)
 
             if (device->vendor_id == USB_VENDOR_SONY &&
                 device->product_id == USB_PRODUCT_SONY_DS4_STRIKEPAD) {
-                /* The Armor-X Pro seems to rotate in the opposite direction on the Z axis */
+                /* The Armor-X Pro seems to only deliver half the rotation it should,
+                 * and in the opposite direction on the Z axis */
                 switch (i) {
                 case 0:
                 case 1:
+                    scale *= 2.0;
                     break;
                 case 2:
-                    scale *= -1.0;
+                    scale *= -2.0;
                     break;
                 default:
                     break;