mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 15:41:49 +01:00
Fixed type cast problems with Gyro output curves. Fixed Easeout Cubic.
Related to issue #1045.
This commit is contained in:
parent
357ddb1dea
commit
0b2ea9454a
@ -1307,7 +1307,7 @@ namespace DS4Windows
|
||||
output = abs - 0.18;
|
||||
else // if (abs > 0.75)
|
||||
output = (abs * 1.72) - 0.72;
|
||||
dState.Motion.outputAccelX = (byte)(output * sign * 128.0);
|
||||
dState.Motion.outputAccelX = (int)(output * sign * 128.0);
|
||||
}
|
||||
else if (sxOutCurveMode == 2)
|
||||
{
|
||||
@ -1325,14 +1325,15 @@ namespace DS4Windows
|
||||
{
|
||||
double abs = Math.Abs(temp);
|
||||
double output = abs * (abs - 2.0);
|
||||
dState.Motion.outputAccelX = (byte)(-1.0 * output *
|
||||
dState.Motion.outputAccelX = (int)(-1.0 * output *
|
||||
sign * 128.0);
|
||||
}
|
||||
else if (sxOutCurveMode == 5)
|
||||
{
|
||||
double inner = Math.Abs(temp) - 1.0;
|
||||
double output = inner * inner * inner + 1.0;
|
||||
dState.Motion.outputAccelX = (byte)(-1.0 * output * 255.0);
|
||||
dState.Motion.outputAccelX = (int)(output *
|
||||
sign * 128.0);
|
||||
}
|
||||
else if (sxOutCurveMode == 6)
|
||||
{
|
||||
@ -1357,7 +1358,7 @@ namespace DS4Windows
|
||||
output = abs - 0.18;
|
||||
else // if (abs > 0.75)
|
||||
output = (abs * 1.72) - 0.72;
|
||||
dState.Motion.outputAccelZ = (byte)(output * sign * 128.0);
|
||||
dState.Motion.outputAccelZ = (int)(output * sign * 128.0);
|
||||
}
|
||||
else if (szOutCurveMode == 2)
|
||||
{
|
||||
@ -1375,14 +1376,15 @@ namespace DS4Windows
|
||||
{
|
||||
double abs = Math.Abs(temp);
|
||||
double output = abs * (abs - 2.0);
|
||||
dState.Motion.outputAccelZ = (byte)(-1.0 * output *
|
||||
dState.Motion.outputAccelZ = (int)(-1.0 * output *
|
||||
sign * 128.0);
|
||||
}
|
||||
else if (szOutCurveMode == 5)
|
||||
{
|
||||
double inner = Math.Abs(temp) - 1.0;
|
||||
double output = inner * inner * inner + 1.0;
|
||||
dState.Motion.outputAccelZ = (byte)(-1.0 * output * 255.0);
|
||||
dState.Motion.outputAccelZ = (int)(output *
|
||||
sign * 128.0);
|
||||
}
|
||||
else if (szOutCurveMode == 6)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user