From 5bd49065213a069a74ea330fcc01508f14047ab2 Mon Sep 17 00:00:00 2001 From: mika-n Date: Mon, 10 Dec 2018 20:29:49 +0200 Subject: [PATCH] Fine tunes. synced with upstream changes --- DS4Windows/DS4Control/Mapping.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 585ca7d..a6daa98 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -4134,11 +4134,11 @@ namespace DS4Windows // L2+R2 triggers use independent 8bit values, so use -255..0..+255 scaled values (therefore L2+R2 Trigger axis supports only 360 turn range) if (Global.getSASteeringWheelEmulationAxis(device) != DS4Controls.L2) { - return (((result - maxRangeLeft) * (32767 - (-32768))) / (maxRangeRight - maxRangeLeft)) + (-32768); + return (((result - maxRangeLeft) * (32767 - (-32768))) / (maxRangeRight - maxRangeLeft)) + (-32768); // Stick axis with configurable range } else { - result = Convert.ToInt32(Math.Round(result / (1.0 * C_WHEEL_ANGLE_PRECISION))); + result = Convert.ToInt32(Math.Round(result / (1.0 * C_WHEEL_ANGLE_PRECISION))); // Trigger axis with fixed 360 range if (result < 0) result = -181 - result; return (((result - (-180)) * (255 - (-255))) / (180 - (-180))) + (-255); }