mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 02:54:20 +01:00
Added easeout cubic curve option
This commit is contained in:
parent
eace87229e
commit
ddb4ca96ba
@ -957,6 +957,15 @@ namespace DS4Windows
|
||||
dState.LX = (byte)(-1.0 * outputX * signX * capX + 128.0);
|
||||
dState.LY = (byte)(-1.0 * outputY * signY * capY + 128.0);
|
||||
}
|
||||
else if (lsOutCurveMode == 5)
|
||||
{
|
||||
double innerX = Math.Abs(tempX) - 1.0;
|
||||
double innerY = Math.Abs(tempY) - 1.0;
|
||||
double outputX = innerX * innerX * innerX + 1.0;
|
||||
double outputY = innerY * innerY * innerY + 1.0;
|
||||
dState.LX = (byte)(1.0 * outputX * signX * capX + 128.0);
|
||||
dState.LY = (byte)(1.0 * outputY * signY * capY + 128.0);
|
||||
}
|
||||
}
|
||||
|
||||
if (getSquareStickRS(device) && (dState.RX != 128 || dState.RY != 128))
|
||||
@ -1046,6 +1055,15 @@ namespace DS4Windows
|
||||
dState.RX = (byte)(-1.0 * outputX * signX * capX + 128.0);
|
||||
dState.RY = (byte)(-1.0 * outputY * signY * capY + 128.0);
|
||||
}
|
||||
else if (rsOutCurveMode == 5)
|
||||
{
|
||||
double innerX = Math.Abs(tempX) - 1.0;
|
||||
double innerY = Math.Abs(tempY) - 1.0;
|
||||
double outputX = innerX * innerX * innerX + 1.0;
|
||||
double outputY = innerY * innerY * innerY + 1.0;
|
||||
dState.RX = (byte)(1.0 * outputX * signX * capX + 128.0);
|
||||
dState.RY = (byte)(1.0 * outputY * signY * capY + 128.0);
|
||||
}
|
||||
}
|
||||
|
||||
int l2OutCurveMode = tempIntArray[device] = getL2OutCurveMode(device);
|
||||
@ -1067,6 +1085,12 @@ namespace DS4Windows
|
||||
double output = temp * (temp - 2.0);
|
||||
dState.L2 = (byte)(-1.0 * output * 255.0);
|
||||
}
|
||||
else if (l2OutCurveMode == 4)
|
||||
{
|
||||
double inner = Math.Abs(temp) - 1.0;
|
||||
double output = inner * inner * inner + 1.0;
|
||||
dState.L2 = (byte)(-1.0 * output * 255.0);
|
||||
}
|
||||
}
|
||||
|
||||
int r2OutCurveMode = tempIntArray[device] = getR2OutCurveMode(device);
|
||||
@ -1088,6 +1112,12 @@ namespace DS4Windows
|
||||
double output = temp * (temp - 2.0);
|
||||
dState.R2 = (byte)(-1.0 * output * 255.0);
|
||||
}
|
||||
else if (r2OutCurveMode == 4)
|
||||
{
|
||||
double inner = Math.Abs(temp) - 1.0;
|
||||
double output = inner * inner * inner + 1.0;
|
||||
dState.R2 = (byte)(-1.0 * output * 255.0);
|
||||
}
|
||||
}
|
||||
|
||||
bool sOff = tempBool = isUsingSAforMouse(device);
|
||||
@ -1170,6 +1200,12 @@ namespace DS4Windows
|
||||
dState.Motion.outputAccelX = (byte)(-1.0 * output *
|
||||
sign * 128.0);
|
||||
}
|
||||
else if (sxOutCurveMode == 4)
|
||||
{
|
||||
double inner = Math.Abs(temp) - 1.0;
|
||||
double output = inner * inner * inner + 1.0;
|
||||
dState.Motion.outputAccelX = (byte)(-1.0 * output * 255.0);
|
||||
}
|
||||
}
|
||||
|
||||
int szOutCurveMode = tempIntArray[device] = getSZOutCurveMode(device);
|
||||
@ -1196,6 +1232,12 @@ namespace DS4Windows
|
||||
dState.Motion.outputAccelZ = (byte)(-1.0 * output *
|
||||
sign * 128.0);
|
||||
}
|
||||
else if (szOutCurveMode == 4)
|
||||
{
|
||||
double inner = Math.Abs(temp) - 1.0;
|
||||
double output = inner * inner * inner + 1.0;
|
||||
dState.Motion.outputAccelZ = (byte)(-1.0 * output * 255.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1780,6 +1780,7 @@ namespace DS4Windows
|
||||
case 2: result = "quadratic"; break;
|
||||
case 3: result = "cubic"; break;
|
||||
case 4: result = "easeout-quad"; break;
|
||||
case 5: result = "easeout-cubic"; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
@ -1796,6 +1797,7 @@ namespace DS4Windows
|
||||
case "quadratic": id = 2; break;
|
||||
case "cubic": id = 3; break;
|
||||
case "easeout-quad": id = 4; break;
|
||||
case "easeout-cubic": id = 5; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
@ -1811,6 +1813,7 @@ namespace DS4Windows
|
||||
case 1: result = "quadratic"; break;
|
||||
case 2: result = "cubic"; break;
|
||||
case 3: result = "easeout-quad"; break;
|
||||
case 4: result = "easeout-cubic"; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
@ -1826,6 +1829,7 @@ namespace DS4Windows
|
||||
case "quadratic": id = 1; break;
|
||||
case "cubic": id = 2; break;
|
||||
case "easeout-quad": id = 3; break;
|
||||
case "easeout-cubic": id = 4; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
18
DS4Windows/DS4Forms/Options.Designer.cs
generated
18
DS4Windows/DS4Forms/Options.Designer.cs
generated
@ -3254,7 +3254,8 @@
|
||||
resources.GetString("cBSixaxisZOutputCurve.Items"),
|
||||
resources.GetString("cBSixaxisZOutputCurve.Items1"),
|
||||
resources.GetString("cBSixaxisZOutputCurve.Items2"),
|
||||
resources.GetString("cBSixaxisZOutputCurve.Items3")});
|
||||
resources.GetString("cBSixaxisZOutputCurve.Items3"),
|
||||
resources.GetString("cBSixaxisZOutputCurve.Items4")});
|
||||
resources.ApplyResources(this.cBSixaxisZOutputCurve, "cBSixaxisZOutputCurve");
|
||||
this.cBSixaxisZOutputCurve.Name = "cBSixaxisZOutputCurve";
|
||||
this.cBSixaxisZOutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBSixaxisZOutputCurve_SelectedIndexChanged);
|
||||
@ -3268,7 +3269,8 @@
|
||||
resources.GetString("cBSixaxisXOutputCurve.Items"),
|
||||
resources.GetString("cBSixaxisXOutputCurve.Items1"),
|
||||
resources.GetString("cBSixaxisXOutputCurve.Items2"),
|
||||
resources.GetString("cBSixaxisXOutputCurve.Items3")});
|
||||
resources.GetString("cBSixaxisXOutputCurve.Items3"),
|
||||
resources.GetString("cBSixaxisXOutputCurve.Items4")});
|
||||
resources.ApplyResources(this.cBSixaxisXOutputCurve, "cBSixaxisXOutputCurve");
|
||||
this.cBSixaxisXOutputCurve.Name = "cBSixaxisXOutputCurve";
|
||||
this.cBSixaxisXOutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBSixaxisXOutputCurve_SelectedIndexChanged);
|
||||
@ -3292,7 +3294,8 @@
|
||||
resources.GetString("cBR2OutputCurve.Items"),
|
||||
resources.GetString("cBR2OutputCurve.Items1"),
|
||||
resources.GetString("cBR2OutputCurve.Items2"),
|
||||
resources.GetString("cBR2OutputCurve.Items3")});
|
||||
resources.GetString("cBR2OutputCurve.Items3"),
|
||||
resources.GetString("cBR2OutputCurve.Items4")});
|
||||
resources.ApplyResources(this.cBR2OutputCurve, "cBR2OutputCurve");
|
||||
this.cBR2OutputCurve.Name = "cBR2OutputCurve";
|
||||
this.cBR2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBR2OutputCurve_SelectedIndexChanged);
|
||||
@ -3306,7 +3309,8 @@
|
||||
resources.GetString("cBL2OutputCurve.Items"),
|
||||
resources.GetString("cBL2OutputCurve.Items1"),
|
||||
resources.GetString("cBL2OutputCurve.Items2"),
|
||||
resources.GetString("cBL2OutputCurve.Items3")});
|
||||
resources.GetString("cBL2OutputCurve.Items3"),
|
||||
resources.GetString("cBL2OutputCurve.Items4")});
|
||||
resources.ApplyResources(this.cBL2OutputCurve, "cBL2OutputCurve");
|
||||
this.cBL2OutputCurve.Name = "cBL2OutputCurve";
|
||||
this.cBL2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBL2OutputCurve_SelectedIndexChanged);
|
||||
@ -3331,7 +3335,8 @@
|
||||
resources.GetString("rsOutCurveComboBox.Items1"),
|
||||
resources.GetString("rsOutCurveComboBox.Items2"),
|
||||
resources.GetString("rsOutCurveComboBox.Items3"),
|
||||
resources.GetString("rsOutCurveComboBox.Items4")});
|
||||
resources.GetString("rsOutCurveComboBox.Items4"),
|
||||
resources.GetString("rsOutCurveComboBox.Items5")});
|
||||
resources.ApplyResources(this.rsOutCurveComboBox, "rsOutCurveComboBox");
|
||||
this.rsOutCurveComboBox.Name = "rsOutCurveComboBox";
|
||||
this.rsOutCurveComboBox.SelectedIndexChanged += new System.EventHandler(this.rsOutCurveComboBox_SelectedIndexChanged);
|
||||
@ -3346,7 +3351,8 @@
|
||||
resources.GetString("lsOutCurveComboBox.Items1"),
|
||||
resources.GetString("lsOutCurveComboBox.Items2"),
|
||||
resources.GetString("lsOutCurveComboBox.Items3"),
|
||||
resources.GetString("lsOutCurveComboBox.Items4")});
|
||||
resources.GetString("lsOutCurveComboBox.Items4"),
|
||||
resources.GetString("lsOutCurveComboBox.Items5")});
|
||||
resources.ApplyResources(this.lsOutCurveComboBox, "lsOutCurveComboBox");
|
||||
this.lsOutCurveComboBox.Name = "lsOutCurveComboBox";
|
||||
this.lsOutCurveComboBox.SelectedIndexChanged += new System.EventHandler(this.lsOutCurveComboBox_SelectedIndexChanged);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user