Added easeout quad curve option for other axes

This commit is contained in:
Travis Nickles 2019-01-29 21:50:29 -06:00
parent 63f7dcfdce
commit 70909bdaa9
4 changed files with 44 additions and 4 deletions

View File

@ -918,6 +918,11 @@ namespace DS4Windows
double output = temp * temp * temp; double output = temp * temp * temp;
dState.L2 = (byte)(output * 255.0); dState.L2 = (byte)(output * 255.0);
} }
else if (l2OutCurveMode == 3)
{
double output = temp * (temp - 2.0);
dState.L2 = (byte)(-1.0 * output * 255.0);
}
} }
int r2OutCurveMode = tempIntArray[device] = getR2OutCurveMode(device); int r2OutCurveMode = tempIntArray[device] = getR2OutCurveMode(device);
@ -934,6 +939,11 @@ namespace DS4Windows
double output = temp * temp * temp; double output = temp * temp * temp;
dState.R2 = (byte)(output * 255.0); dState.R2 = (byte)(output * 255.0);
} }
else if (r2OutCurveMode == 3)
{
double output = temp * (temp - 2.0);
dState.R2 = (byte)(-1.0 * output * 255.0);
}
} }
bool sOff = tempBool = isUsingSAforMouse(device); bool sOff = tempBool = isUsingSAforMouse(device);
@ -1009,6 +1019,12 @@ namespace DS4Windows
result = (int)(output * 128.0); result = (int)(output * 128.0);
dState.Motion.outputAccelX = result; dState.Motion.outputAccelX = result;
} }
else if (sxOutCurveMode == 3)
{
double output = temp * (temp - 2.0);
result = (int)(-1.0 * output * 128.0);
dState.Motion.outputAccelX = result;
}
} }
int szOutCurveMode = tempIntArray[device] = getSZOutCurveMode(device); int szOutCurveMode = tempIntArray[device] = getSZOutCurveMode(device);
@ -1028,6 +1044,12 @@ namespace DS4Windows
result = (int)(output * 128.0); result = (int)(output * 128.0);
dState.Motion.outputAccelZ = result; dState.Motion.outputAccelZ = result;
} }
else if (szOutCurveMode == 3)
{
double output = temp * (temp - 2.0);
result = (int)(-1.0 * output * 128.0);
dState.Motion.outputAccelZ = result;
}
} }
} }

View File

@ -1610,6 +1610,7 @@ namespace DS4Windows
case 0: break; case 0: break;
case 1: result = "quadratic"; break; case 1: result = "quadratic"; break;
case 2: result = "cubic"; break; case 2: result = "cubic"; break;
case 3: result = "easeout-quad"; break;
default: break; default: break;
} }
@ -1624,6 +1625,7 @@ namespace DS4Windows
case "linear": id = 0; break; case "linear": id = 0; break;
case "quadratic": id = 1; break; case "quadratic": id = 1; break;
case "cubic": id = 2; break; case "cubic": id = 2; break;
case "easeout-quad": id = 3; break;
default: break; default: break;
} }

View File

@ -3137,7 +3137,8 @@
this.cBSixaxisZOutputCurve.Items.AddRange(new object[] { this.cBSixaxisZOutputCurve.Items.AddRange(new object[] {
resources.GetString("cBSixaxisZOutputCurve.Items"), resources.GetString("cBSixaxisZOutputCurve.Items"),
resources.GetString("cBSixaxisZOutputCurve.Items1"), resources.GetString("cBSixaxisZOutputCurve.Items1"),
resources.GetString("cBSixaxisZOutputCurve.Items2")}); resources.GetString("cBSixaxisZOutputCurve.Items2"),
resources.GetString("cBSixaxisZOutputCurve.Items3")});
resources.ApplyResources(this.cBSixaxisZOutputCurve, "cBSixaxisZOutputCurve"); resources.ApplyResources(this.cBSixaxisZOutputCurve, "cBSixaxisZOutputCurve");
this.cBSixaxisZOutputCurve.Name = "cBSixaxisZOutputCurve"; this.cBSixaxisZOutputCurve.Name = "cBSixaxisZOutputCurve";
this.cBSixaxisZOutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBSixaxisZOutputCurve_SelectedIndexChanged); this.cBSixaxisZOutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBSixaxisZOutputCurve_SelectedIndexChanged);
@ -3150,7 +3151,8 @@
this.cBSixaxisXOutputCurve.Items.AddRange(new object[] { this.cBSixaxisXOutputCurve.Items.AddRange(new object[] {
resources.GetString("cBSixaxisXOutputCurve.Items"), resources.GetString("cBSixaxisXOutputCurve.Items"),
resources.GetString("cBSixaxisXOutputCurve.Items1"), resources.GetString("cBSixaxisXOutputCurve.Items1"),
resources.GetString("cBSixaxisXOutputCurve.Items2")}); resources.GetString("cBSixaxisXOutputCurve.Items2"),
resources.GetString("cBSixaxisXOutputCurve.Items3")});
resources.ApplyResources(this.cBSixaxisXOutputCurve, "cBSixaxisXOutputCurve"); resources.ApplyResources(this.cBSixaxisXOutputCurve, "cBSixaxisXOutputCurve");
this.cBSixaxisXOutputCurve.Name = "cBSixaxisXOutputCurve"; this.cBSixaxisXOutputCurve.Name = "cBSixaxisXOutputCurve";
this.cBSixaxisXOutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBSixaxisXOutputCurve_SelectedIndexChanged); this.cBSixaxisXOutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBSixaxisXOutputCurve_SelectedIndexChanged);
@ -3173,7 +3175,8 @@
this.cBR2OutputCurve.Items.AddRange(new object[] { this.cBR2OutputCurve.Items.AddRange(new object[] {
resources.GetString("cBR2OutputCurve.Items"), resources.GetString("cBR2OutputCurve.Items"),
resources.GetString("cBR2OutputCurve.Items1"), resources.GetString("cBR2OutputCurve.Items1"),
resources.GetString("cBR2OutputCurve.Items2")}); resources.GetString("cBR2OutputCurve.Items2"),
resources.GetString("cBR2OutputCurve.Items3")});
resources.ApplyResources(this.cBR2OutputCurve, "cBR2OutputCurve"); resources.ApplyResources(this.cBR2OutputCurve, "cBR2OutputCurve");
this.cBR2OutputCurve.Name = "cBR2OutputCurve"; this.cBR2OutputCurve.Name = "cBR2OutputCurve";
this.cBR2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBR2OutputCurve_SelectedIndexChanged); this.cBR2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBR2OutputCurve_SelectedIndexChanged);
@ -3186,7 +3189,8 @@
this.cBL2OutputCurve.Items.AddRange(new object[] { this.cBL2OutputCurve.Items.AddRange(new object[] {
resources.GetString("cBL2OutputCurve.Items"), resources.GetString("cBL2OutputCurve.Items"),
resources.GetString("cBL2OutputCurve.Items1"), resources.GetString("cBL2OutputCurve.Items1"),
resources.GetString("cBL2OutputCurve.Items2")}); resources.GetString("cBL2OutputCurve.Items2"),
resources.GetString("cBL2OutputCurve.Items3")});
resources.ApplyResources(this.cBL2OutputCurve, "cBL2OutputCurve"); resources.ApplyResources(this.cBL2OutputCurve, "cBL2OutputCurve");
this.cBL2OutputCurve.Name = "cBL2OutputCurve"; this.cBL2OutputCurve.Name = "cBL2OutputCurve";
this.cBL2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBL2OutputCurve_SelectedIndexChanged); this.cBL2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBL2OutputCurve_SelectedIndexChanged);

View File

@ -6922,6 +6922,9 @@ with profile</value>
<data name="cBSixaxisZOutputCurve.Items2" xml:space="preserve"> <data name="cBSixaxisZOutputCurve.Items2" xml:space="preserve">
<value>Cubic</value> <value>Cubic</value>
</data> </data>
<data name="cBSixaxisZOutputCurve.Items3" xml:space="preserve">
<value>Easeout Quad</value>
</data>
<data name="cBSixaxisZOutputCurve.Location" type="System.Drawing.Point, System.Drawing"> <data name="cBSixaxisZOutputCurve.Location" type="System.Drawing.Point, System.Drawing">
<value>221, 28</value> <value>221, 28</value>
</data> </data>
@ -6952,6 +6955,9 @@ with profile</value>
<data name="cBSixaxisXOutputCurve.Items2" xml:space="preserve"> <data name="cBSixaxisXOutputCurve.Items2" xml:space="preserve">
<value>Cubic</value> <value>Cubic</value>
</data> </data>
<data name="cBSixaxisXOutputCurve.Items3" xml:space="preserve">
<value>Easeout Quad</value>
</data>
<data name="cBSixaxisXOutputCurve.Location" type="System.Drawing.Point, System.Drawing"> <data name="cBSixaxisXOutputCurve.Location" type="System.Drawing.Point, System.Drawing">
<value>221, 1</value> <value>221, 1</value>
</data> </data>
@ -7042,6 +7048,9 @@ with profile</value>
<data name="cBR2OutputCurve.Items2" xml:space="preserve"> <data name="cBR2OutputCurve.Items2" xml:space="preserve">
<value>Cubic</value> <value>Cubic</value>
</data> </data>
<data name="cBR2OutputCurve.Items3" xml:space="preserve">
<value>Easeout Quad</value>
</data>
<data name="cBR2OutputCurve.Location" type="System.Drawing.Point, System.Drawing"> <data name="cBR2OutputCurve.Location" type="System.Drawing.Point, System.Drawing">
<value>111, 28</value> <value>111, 28</value>
</data> </data>
@ -7072,6 +7081,9 @@ with profile</value>
<data name="cBL2OutputCurve.Items2" xml:space="preserve"> <data name="cBL2OutputCurve.Items2" xml:space="preserve">
<value>Cubic</value> <value>Cubic</value>
</data> </data>
<data name="cBL2OutputCurve.Items3" xml:space="preserve">
<value>Easeout Quad</value>
</data>
<data name="cBL2OutputCurve.Location" type="System.Drawing.Point, System.Drawing"> <data name="cBL2OutputCurve.Location" type="System.Drawing.Point, System.Drawing">
<value>31, 28</value> <value>31, 28</value>
</data> </data>