SDL: Fixed the GameSir-G7 Pro 8K accelerometer scale

From 7775bbef9f70c534f20468ba6654332efa883668 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 26 Feb 2026 09:07:15 -0800
Subject: [PATCH] Fixed the GameSir-G7 Pro 8K accelerometer scale

---
 src/joystick/hidapi/SDL_hidapi_gamesir.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/joystick/hidapi/SDL_hidapi_gamesir.c b/src/joystick/hidapi/SDL_hidapi_gamesir.c
index 2e8b0629f36a3..93be50223352e 100644
--- a/src/joystick/hidapi/SDL_hidapi_gamesir.c
+++ b/src/joystick/hidapi/SDL_hidapi_gamesir.c
@@ -390,9 +390,9 @@ static bool HIDAPI_DriverGameSir_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joy
         // GameSir SDL protocol packets currently don't expose an IMU timestamp.
         // Use a synthetic monotonic timestamp at the firmware's fixed IMU rate.
         ctx->sensor_timestamp_ns = SDL_GetTicksNS();
-        // Accelerometer scale factor: assume a range of ±2g, 16-bit signed values (-32768 to 32767)
-        // 32768 corresponds to 2g, so the scale factor = 2 * SDL_STANDARD_GRAVITY / 32768.0f
-        ctx->accelScale = 2.0f * SDL_STANDARD_GRAVITY / 32768.0f;
+        // Accelerometer scale factor: assume a range of ±4g, 16-bit signed values (-32768 to 32767)
+        // 32768 corresponds to 4g, so the scale factor = 4 * SDL_STANDARD_GRAVITY / 32768.0f
+        ctx->accelScale = 4.0f * SDL_STANDARD_GRAVITY / 32768.0f;
 
         // Gyro scale factor: based on the PS4 implementation
         // PS4 uses (gyro_numerator / gyro_denominator) * (π / 180)