mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-22 17:29:18 +01:00
Fix output curves for sixaxis
This commit is contained in:
parent
55f3e5ef66
commit
fd9c56f13d
@ -972,34 +972,34 @@ namespace DS4Windows
|
||||
int sxOutCurveMode = tempIntArray[device] = getSXOutCurveMode(device);
|
||||
if (sxOutCurveMode > 0)
|
||||
{
|
||||
double temp = Math.Abs(dState.Motion.outputAccelX) / 128.0;
|
||||
double temp = dState.Motion.outputAccelX / 128.0;
|
||||
double sign = Math.Sign(temp);
|
||||
if (sxOutCurveMode == 1)
|
||||
{
|
||||
double output = temp * temp;
|
||||
dState.Motion.outputAccelX = (byte)(output * sign * 128.0);
|
||||
dState.Motion.outputAccelX = (int)(output * sign * 128.0);
|
||||
}
|
||||
else if (sxOutCurveMode == 2)
|
||||
{
|
||||
double output = temp * temp * temp;
|
||||
dState.Motion.outputAccelX = (byte)(output * 128.0);
|
||||
dState.Motion.outputAccelX = (int)(output * 128.0);
|
||||
}
|
||||
}
|
||||
|
||||
int szOutCurveMode = tempIntArray[device] = getSZOutCurveMode(device);
|
||||
if (szOutCurveMode > 0)
|
||||
{
|
||||
double temp = Math.Abs(dState.Motion.outputAccelZ) / 128.0;
|
||||
double temp = dState.Motion.outputAccelZ / 128.0;
|
||||
double sign = Math.Sign(temp);
|
||||
if (szOutCurveMode == 1)
|
||||
{
|
||||
double output = temp * temp;
|
||||
dState.Motion.outputAccelZ = (byte)(output * sign * 128.0);
|
||||
dState.Motion.outputAccelZ = (int)(output * sign * 128.0);
|
||||
}
|
||||
else if (szOutCurveMode == 2)
|
||||
{
|
||||
double output = temp * temp * temp;
|
||||
dState.Motion.outputAccelZ = (byte)(output * 128.0);
|
||||
dState.Motion.outputAccelZ = (int)(output * 128.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user