From 02f66981a7ec8e4ccea47487c49bf6cb5c6e1bfa Mon Sep 17 00:00:00 2001 From: mika-n Date: Thu, 9 May 2019 23:21:31 +0300 Subject: [PATCH] Steering wheel emulation for the new dualshock4 controller option. Fine tuned anti-deadzone calculation for DS4 output controller. --- 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 b7500a5..9dfc8c5 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -4087,8 +4087,8 @@ namespace DS4Windows if (sxAntiDead > 0) { sxAntiDead *= (outputAxisMax - outputAxisZero); - if (result < 0) return (((result - maxRangeLeft) * (-Convert.ToInt32(sxAntiDead) - (outputAxisMin))) / (0 - maxRangeLeft)) + (outputAxisMin); - else return (((result - 0) * (outputAxisMax - (Convert.ToInt32(sxAntiDead)))) / (maxRangeRight - 0)) + (Convert.ToInt32(sxAntiDead)); + if (result < 0) return (((result - maxRangeLeft) * (outputAxisZero - Convert.ToInt32(sxAntiDead) - (outputAxisMin))) / (0 - maxRangeLeft)) + (outputAxisMin); + else return (((result - 0) * (outputAxisMax - (outputAxisZero + Convert.ToInt32(sxAntiDead)))) / (maxRangeRight - 0)) + (outputAxisZero + Convert.ToInt32(sxAntiDead)); } else {