From 7a35ca19cbfa66da2e9cb19bb9fab61f33194a25 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 29 Jan 2019 22:11:01 -0600 Subject: [PATCH] Fixed sixaxis easeout quad --- DS4Windows/DS4Control/Mapping.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index e0847fe..d797c6e 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1021,9 +1021,10 @@ namespace DS4Windows } else if (sxOutCurveMode == 3) { - double output = temp * (temp - 2.0); - result = (int)(-1.0 * output * 128.0); - dState.Motion.outputAccelX = result; + double abs = Math.Abs(temp); + double output = abs * (abs - 2.0); + dState.Motion.outputAccelX = (byte)(-1.0 * output * + sign * 128.0); } } @@ -1046,9 +1047,10 @@ namespace DS4Windows } else if (szOutCurveMode == 3) { - double output = temp * (temp - 2.0); - result = (int)(-1.0 * output * 128.0); - dState.Motion.outputAccelZ = result; + double abs = Math.Abs(temp); + double output = abs * (abs - 2.0); + dState.Motion.outputAccelZ = (byte)(-1.0 * output * + sign * 128.0); } } }