mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 19:14:20 +01:00
Added output curve options for L2 and R2
This commit is contained in:
parent
0e8daf05b0
commit
fd1479f09f
@ -23,7 +23,7 @@ namespace DS4Windows
|
||||
public DS4StateExposed[] ExposedState = new DS4StateExposed[DS4_CONTROLLER_COUNT];
|
||||
public bool recordingMacro = false;
|
||||
public event EventHandler<DebugEventArgs> Debug = null;
|
||||
bool[] buttonsdown = { false, false, false, false };
|
||||
bool[] buttonsdown = new bool[4] { false, false, false, false };
|
||||
List<DS4Controls> dcs = new List<DS4Controls>();
|
||||
bool[] held = new bool[DS4_CONTROLLER_COUNT];
|
||||
int[] oldmouse = new int[DS4_CONTROLLER_COUNT] { -1, -1, -1, -1 };
|
||||
@ -691,10 +691,10 @@ namespace DS4Windows
|
||||
}
|
||||
}
|
||||
|
||||
public bool[] lag = { false, false, false, false };
|
||||
public bool[] inWarnMonitor = { false, false, false, false };
|
||||
private byte[] currentBattery = { 0, 0, 0, 0 };
|
||||
private bool[] charging = { false, false, false, false };
|
||||
public bool[] lag = new bool[4] { false, false, false, false };
|
||||
public bool[] inWarnMonitor = new bool[4] { false, false, false, false };
|
||||
private byte[] currentBattery = new byte[4] { 0, 0, 0, 0 };
|
||||
private bool[] charging = new bool[4] { false, false, false, false };
|
||||
|
||||
// Called every time a new input report has arrived
|
||||
protected virtual void On_Report(object sender, EventArgs e)
|
||||
|
@ -404,7 +404,7 @@ namespace DS4Windows
|
||||
return (value < min) ? min : (value > max) ? max : value;
|
||||
}
|
||||
|
||||
private static double[] tempDoubleArray = { 0.0, 0.0, 0.0, 0.0 };
|
||||
private static double[] tempDoubleArray = new double[4] { 0.0, 0.0, 0.0, 0.0 };
|
||||
public static DS4State SetCurveAndDeadzone(int device, DS4State cState)
|
||||
{
|
||||
double rotation = tempDoubleArray[device] = getLSRotation(device);
|
||||
@ -436,7 +436,6 @@ namespace DS4Windows
|
||||
{
|
||||
curvex = (x > 127.5f ? Math.Min(x, (x / max) * multimax) : Math.Max(x, (x / max) * multimin));
|
||||
curvey = (y > 127.5f ? Math.Min(y, (y / max) * multimax) : Math.Max(y, (y / max) * multimin));
|
||||
//btnLSTrack.Location = new Point((int)(dpix * curvex / 2.09 + lbLSTrack.Location.X), (int)(dpiy * curvey / 2.09 + lbLSTrack.Location.Y));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -528,8 +527,6 @@ namespace DS4Windows
|
||||
{
|
||||
double currentX = Global.Clamp(maxZoneXNegValue, dState.LX, maxZoneXPosValue);
|
||||
double currentY = Global.Clamp(maxZoneYNegValue, dState.LY, maxZoneYPosValue);
|
||||
//currentX = (byte)((dState.LX >= 127.5f) ? Math.Min(dState.LX, maxZoneX) : Math.Max(dState.LX, maxZoneX));
|
||||
//currentY = (byte)((dState.LY >= 127.5f) ? Math.Min(dState.LY, maxZoneY) : Math.Max(dState.LY, maxZoneY));
|
||||
tempOutputX = ((currentX - 127.5f - tempLsXDead) / (maxZoneX - tempLsXDead));
|
||||
tempOutputY = ((currentY - 127.5f - tempLsYDead) / (maxZoneY - tempLsYDead));
|
||||
}
|
||||
@ -609,8 +606,6 @@ namespace DS4Windows
|
||||
|
||||
tempOutputX = ((currentX - 127.5f - tempRsXDead) / (maxZoneX - tempRsXDead));
|
||||
tempOutputY = ((currentY - 127.5f - tempRsYDead) / (maxZoneY - tempRsYDead));
|
||||
//tempOutputX = ((dState.RX - 127.5f - tempRsXDead) / (double)(maxXValue - tempRsXDead));
|
||||
//tempOutputY = ((dState.RY - 127.5f - tempRsYDead) / (double)(maxYValue - tempRsYDead));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -620,8 +615,6 @@ namespace DS4Windows
|
||||
|
||||
tempOutputX = (currentX - 127.5f) / maxZoneX;
|
||||
tempOutputY = (currentY - 127.5f) / maxZoneY;
|
||||
//tempOutputX = ((dState.RX - 127.5f) / (double)(maxXValue));
|
||||
//tempOutputY = ((dState.RY - 127.5f) / (double)(maxYValue));
|
||||
}
|
||||
|
||||
double tempRsXAntiDeadPercent = 0.0, tempRsYAntiDeadPercent = 0.0;
|
||||
@ -752,8 +745,8 @@ namespace DS4Windows
|
||||
int lsOutCurveMode = lsOutCurveModeArray[device] = getLsOutCurveMode(device);
|
||||
if (lsOutCurveMode != 0)
|
||||
{
|
||||
double tempX = (dState.LX - 127.5f) / 127.5;
|
||||
double tempY = (dState.LY - 127.5f) / 127.5;
|
||||
double tempX = (dState.LX - 127.5) / 127.5;
|
||||
double tempY = (dState.LY - 127.5) / 127.5;
|
||||
double signX = tempX >= 0.0 ? 1.0 : -1.0;
|
||||
double signY = tempY >= 0.0 ? 1.0 : -1.0;
|
||||
|
||||
@ -790,30 +783,30 @@ namespace DS4Windows
|
||||
outputY = (absY * 1.992) - 0.992;
|
||||
}
|
||||
|
||||
dState.LX = (byte)(outputX * signX * 127.5f + 127.5f);
|
||||
dState.LY = (byte)(outputY * signY * 127.5f + 127.5f);
|
||||
dState.LX = (byte)(outputX * signX * 127.5 + 127.5);
|
||||
dState.LY = (byte)(outputY * signY * 127.5 + 127.5);
|
||||
}
|
||||
else if (lsOutCurveMode == 2)
|
||||
{
|
||||
double outputX = tempX * tempX;
|
||||
double outputY = tempY * tempY;
|
||||
dState.LX = (byte)(outputX * signX * 127.5f + 127.5f);
|
||||
dState.LY = (byte)(outputY * signY * 127.5f + 127.5f);
|
||||
dState.LX = (byte)(outputX * signX * 127.5 + 127.5);
|
||||
dState.LY = (byte)(outputY * signY * 127.5 + 127.5);
|
||||
}
|
||||
else if (lsOutCurveMode == 3)
|
||||
{
|
||||
double outputX = tempX * tempX * tempX;
|
||||
double outputY = tempY * tempY * tempY;
|
||||
dState.LX = (byte)(outputX * 127.5f + 127.5f);
|
||||
dState.LY = (byte)(outputY * 127.5f + 127.5f);
|
||||
dState.LX = (byte)(outputX * 127.5 + 127.5);
|
||||
dState.LY = (byte)(outputY * 127.5 + 127.5);
|
||||
}
|
||||
}
|
||||
|
||||
int rsOutCurveMode = rsOutCurveModeArray[device] = getRsOutCurveMode(device);
|
||||
if (rsOutCurveMode != 0)
|
||||
{
|
||||
double tempX = (dState.RX - 127.5f) / 127.5;
|
||||
double tempY = (dState.RY - 127.5f) / 127.5;
|
||||
double tempX = (dState.RX - 127.5) / 127.5;
|
||||
double tempY = (dState.RY - 127.5) / 127.5;
|
||||
double signX = tempX >= 0.0 ? 1.0 : -1.0;
|
||||
double signY = tempY >= 0.0 ? 1.0 : -1.0;
|
||||
|
||||
@ -850,22 +843,54 @@ namespace DS4Windows
|
||||
outputY = (absY * 1.992) - 0.992;
|
||||
}
|
||||
|
||||
dState.RX = (byte)(outputX * signX * 127.5f + 127.5f);
|
||||
dState.RY = (byte)(outputY * signY * 127.5f + 127.5f);
|
||||
dState.RX = (byte)(outputX * signX * 127.5 + 127.5);
|
||||
dState.RY = (byte)(outputY * signY * 127.5 + 127.5);
|
||||
}
|
||||
else if (rsOutCurveMode == 2)
|
||||
{
|
||||
double outputX = tempX * tempX;
|
||||
double outputY = tempY * tempY;
|
||||
dState.RX = (byte)(outputX * signX * 127.5f + 127.5f);
|
||||
dState.RY = (byte)(outputY * signY * 127.5f + 127.5f);
|
||||
dState.RX = (byte)(outputX * signX * 127.5 + 127.5);
|
||||
dState.RY = (byte)(outputY * signY * 127.5 + 127.5);
|
||||
}
|
||||
else if (rsOutCurveMode == 3)
|
||||
{
|
||||
double outputX = tempX * tempX * tempX;
|
||||
double outputY = tempY * tempY * tempY;
|
||||
dState.RX = (byte)(outputX * 127.5f + 127.5f);
|
||||
dState.RY = (byte)(outputY * 127.5f + 127.5f);
|
||||
dState.RX = (byte)(outputX * 127.5 + 127.5);
|
||||
dState.RY = (byte)(outputY * 127.5 + 127.5);
|
||||
}
|
||||
}
|
||||
|
||||
int l2OutCurveMode = getL2OutCurveMode(device);
|
||||
if (l2OutCurveMode > 0)
|
||||
{
|
||||
double temp = dState.L2 / 255.0;
|
||||
if (l2OutCurveMode == 1)
|
||||
{
|
||||
double output = temp * temp;
|
||||
dState.L2 = (byte)(output * 255.0);
|
||||
}
|
||||
else if (l2OutCurveMode == 2)
|
||||
{
|
||||
double output = temp * temp * temp;
|
||||
dState.L2 = (byte)(output * 255.0);
|
||||
}
|
||||
}
|
||||
|
||||
int r2OutCurveMode = getR2OutCurveMode(device);
|
||||
if (r2OutCurveMode > 0)
|
||||
{
|
||||
double temp = dState.R2 / 255.0;
|
||||
if (r2OutCurveMode == 1)
|
||||
{
|
||||
double output = temp * temp;
|
||||
dState.R2 = (byte)(output * 255.0);
|
||||
}
|
||||
else if (r2OutCurveMode == 2)
|
||||
{
|
||||
double output = temp * temp * temp;
|
||||
dState.R2 = (byte)(output * 255.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -864,6 +864,18 @@ namespace DS4Windows
|
||||
return m_Config.rsOutCurveMode[index];
|
||||
}
|
||||
|
||||
public static int[] l2OutCurveMode => m_Config.l2OutCurveMode;
|
||||
public static int getL2OutCurveMode(int index)
|
||||
{
|
||||
return m_Config.l2OutCurveMode[index];
|
||||
}
|
||||
|
||||
public static int[] r2OutCurveMode => m_Config.r2OutCurveMode;
|
||||
public static int getR2OutCurveMode(int index)
|
||||
{
|
||||
return m_Config.r2OutCurveMode[index];
|
||||
}
|
||||
|
||||
public static string[] LaunchProgram => m_Config.launchProgram;
|
||||
public static string[] ProfilePath => m_Config.profilePath;
|
||||
public static bool[] DistanceProfiles = m_Config.distanceProfiles;
|
||||
@ -1211,6 +1223,8 @@ namespace DS4Windows
|
||||
public int[] btPollRate = { 4, 4, 4, 4, 4 };
|
||||
public int[] lsOutCurveMode = { 0, 0, 0, 0, 0 };
|
||||
public int[] rsOutCurveMode = { 0, 0, 0, 0, 0 };
|
||||
public int[] l2OutCurveMode = new int[5] { 0, 0, 0, 0, 0 };
|
||||
public int[] r2OutCurveMode = new int[5] { 0, 0, 0, 0, 0 };
|
||||
|
||||
public DS4Color[] m_LowLeds = new DS4Color[]
|
||||
{
|
||||
@ -1410,7 +1424,7 @@ namespace DS4Windows
|
||||
catch { return 0; }
|
||||
}*/
|
||||
|
||||
private string outputCurveString(int id)
|
||||
private string stickOutputCurveString(int id)
|
||||
{
|
||||
string result = "linear";
|
||||
switch (id)
|
||||
@ -1425,7 +1439,7 @@ namespace DS4Windows
|
||||
return result;
|
||||
}
|
||||
|
||||
private int outputCurveId(string name)
|
||||
private int stickOutputCurveId(string name)
|
||||
{
|
||||
int id = 0;
|
||||
switch (name)
|
||||
@ -1440,6 +1454,34 @@ namespace DS4Windows
|
||||
return id;
|
||||
}
|
||||
|
||||
private string axisOutputCurveString(int id)
|
||||
{
|
||||
string result = "linear";
|
||||
switch (id)
|
||||
{
|
||||
case 0: break;
|
||||
case 1: result = "quadratic"; break;
|
||||
case 2: result = "cubic"; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private int axisOutputCurveId(string name)
|
||||
{
|
||||
int id = 0;
|
||||
switch (name)
|
||||
{
|
||||
case "linear": id = 0; break;
|
||||
case "quadratic": id = 1; break;
|
||||
case "cubic": id = 2; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
public bool SaveProfile(int device, string propath)
|
||||
{
|
||||
bool Saved = true;
|
||||
@ -1538,8 +1580,11 @@ namespace DS4Windows
|
||||
XmlNode xmlRSC = m_Xdoc.CreateNode(XmlNodeType.Element, "RSCurve", null); xmlRSC.InnerText = rsCurve[device].ToString(); Node.AppendChild(xmlRSC);
|
||||
XmlNode xmlProfileActions = m_Xdoc.CreateNode(XmlNodeType.Element, "ProfileActions", null); xmlProfileActions.InnerText = string.Join("/", profileActions[device]); Node.AppendChild(xmlProfileActions);
|
||||
XmlNode xmlBTPollRate = m_Xdoc.CreateNode(XmlNodeType.Element, "BTPollRate", null); xmlBTPollRate.InnerText = btPollRate[device].ToString(); Node.AppendChild(xmlBTPollRate);
|
||||
XmlNode xmlLsOutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "LSOutputCurveMode", null); xmlLsOutputCurveMode.InnerText = outputCurveString(lsOutCurveMode[device]); Node.AppendChild(xmlLsOutputCurveMode);
|
||||
XmlNode xmlRsOutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "RSOutputCurveMode", null); xmlRsOutputCurveMode.InnerText = outputCurveString(rsOutCurveMode[device]); Node.AppendChild(xmlRsOutputCurveMode);
|
||||
XmlNode xmlLsOutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "LSOutputCurveMode", null); xmlLsOutputCurveMode.InnerText = stickOutputCurveString(lsOutCurveMode[device]); Node.AppendChild(xmlLsOutputCurveMode);
|
||||
XmlNode xmlRsOutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "RSOutputCurveMode", null); xmlRsOutputCurveMode.InnerText = stickOutputCurveString(rsOutCurveMode[device]); Node.AppendChild(xmlRsOutputCurveMode);
|
||||
|
||||
XmlNode xmlL2OutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "L2OutputCurveMode", null); xmlL2OutputCurveMode.InnerText = axisOutputCurveString(l2OutCurveMode[device]); Node.AppendChild(xmlL2OutputCurveMode);
|
||||
XmlNode xmlR2OutputCurveMode = m_Xdoc.CreateNode(XmlNodeType.Element, "R2OutputCurveMode", null); xmlR2OutputCurveMode.InnerText = axisOutputCurveString(r2OutCurveMode[device]); Node.AppendChild(xmlR2OutputCurveMode);
|
||||
|
||||
XmlNode NodeControl = m_Xdoc.CreateNode(XmlNodeType.Element, "Control", null);
|
||||
XmlNode Key = m_Xdoc.CreateNode(XmlNodeType.Element, "Key", null);
|
||||
@ -2529,12 +2574,18 @@ namespace DS4Windows
|
||||
}
|
||||
catch { btPollRate[device] = 4; missingSetting = true; }
|
||||
|
||||
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LSOutputCurveMode"); lsOutCurveMode[device] = outputCurveId(Item.InnerText); }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LSOutputCurveMode"); lsOutCurveMode[device] = stickOutputCurveId(Item.InnerText); }
|
||||
catch { lsOutCurveMode[device] = 0; missingSetting = true; }
|
||||
|
||||
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/RSOutputCurveMode"); rsOutCurveMode[device] = outputCurveId(Item.InnerText); }
|
||||
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/RSOutputCurveMode"); rsOutCurveMode[device] = stickOutputCurveId(Item.InnerText); }
|
||||
catch { rsOutCurveMode[device] = 0; missingSetting = true; }
|
||||
|
||||
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/L2OutputCurveMode"); l2OutCurveMode[device] = axisOutputCurveId(Item.InnerText); }
|
||||
catch { l2OutCurveMode[device] = 0; missingSetting = true; }
|
||||
|
||||
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/R2OutputCurveMode"); r2OutCurveMode[device] = axisOutputCurveId(Item.InnerText); }
|
||||
catch { r2OutCurveMode[device] = 0; missingSetting = true; }
|
||||
|
||||
try
|
||||
{
|
||||
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/ProfileActions");
|
||||
@ -3577,6 +3628,8 @@ namespace DS4Windows
|
||||
gyroMouseHorizontalAxis[device] = 0;
|
||||
lsOutCurveMode[device] = 0;
|
||||
rsOutCurveMode[device] = 0;
|
||||
l2OutCurveMode[device] = 0;
|
||||
r2OutCurveMode[device] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
136
DS4Windows/DS4Forms/Options.Designer.cs
generated
136
DS4Windows/DS4Forms/Options.Designer.cs
generated
@ -255,6 +255,10 @@
|
||||
this.tCSens = new System.Windows.Forms.TabControl();
|
||||
this.tPDeadzone = new System.Windows.Forms.TabPage();
|
||||
this.antiDeadzoneTabPage = new System.Windows.Forms.TabPage();
|
||||
this.nUDSixaxisZAntiDead = new System.Windows.Forms.NumericUpDown();
|
||||
this.nUDSixaxisXAntiDead = new System.Windows.Forms.NumericUpDown();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
this.label19 = new System.Windows.Forms.Label();
|
||||
this.nUDR2AntiDead = new System.Windows.Forms.NumericUpDown();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.nUDL2AntiDead = new System.Windows.Forms.NumericUpDown();
|
||||
@ -350,10 +354,10 @@
|
||||
this.pSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.alwaysOnToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.advColorDialog = new DS4Windows.AdvancedColorDialog();
|
||||
this.label19 = new System.Windows.Forms.Label();
|
||||
this.label20 = new System.Windows.Forms.Label();
|
||||
this.nUDSixaxisXAntiDead = new System.Windows.Forms.NumericUpDown();
|
||||
this.nUDSixaxisZAntiDead = new System.Windows.Forms.NumericUpDown();
|
||||
this.label21 = new System.Windows.Forms.Label();
|
||||
this.label22 = new System.Windows.Forms.Label();
|
||||
this.cBL2OutputCurve = new System.Windows.Forms.ComboBox();
|
||||
this.cBR2OutputCurve = new System.Windows.Forms.ComboBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDRainbow)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tBBlueBar)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tBGreenBar)).BeginInit();
|
||||
@ -411,6 +415,8 @@
|
||||
this.tCSens.SuspendLayout();
|
||||
this.tPDeadzone.SuspendLayout();
|
||||
this.antiDeadzoneTabPage.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisZAntiDead)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisXAntiDead)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDR2AntiDead)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDL2AntiDead)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDRSAntiDead)).BeginInit();
|
||||
@ -443,8 +449,6 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSXS)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSZS)).BeginInit();
|
||||
this.cMGyroTriggers.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisXAntiDead)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisZAntiDead)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lowColorChooserButton
|
||||
@ -2675,8 +2679,8 @@
|
||||
this.tCSens.Controls.Add(this.tPDeadzone);
|
||||
this.tCSens.Controls.Add(this.antiDeadzoneTabPage);
|
||||
this.tCSens.Controls.Add(this.maxZoneTabPage);
|
||||
this.tCSens.Controls.Add(this.tPCurve);
|
||||
this.tCSens.Controls.Add(this.tPOutCurve);
|
||||
this.tCSens.Controls.Add(this.tPCurve);
|
||||
this.tCSens.Controls.Add(this.tpRotation);
|
||||
resources.ApplyResources(this.tCSens, "tCSens");
|
||||
this.tCSens.Name = "tCSens";
|
||||
@ -2718,6 +2722,50 @@
|
||||
this.antiDeadzoneTabPage.Name = "antiDeadzoneTabPage";
|
||||
this.antiDeadzoneTabPage.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// nUDSixaxisZAntiDead
|
||||
//
|
||||
this.nUDSixaxisZAntiDead.DecimalPlaces = 2;
|
||||
this.nUDSixaxisZAntiDead.Increment = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
resources.ApplyResources(this.nUDSixaxisZAntiDead, "nUDSixaxisZAntiDead");
|
||||
this.nUDSixaxisZAntiDead.Maximum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nUDSixaxisZAntiDead.Name = "nUDSixaxisZAntiDead";
|
||||
this.nUDSixaxisZAntiDead.ValueChanged += new System.EventHandler(this.nUDSixaxisZAntiDead_ValueChanged);
|
||||
//
|
||||
// nUDSixaxisXAntiDead
|
||||
//
|
||||
this.nUDSixaxisXAntiDead.DecimalPlaces = 2;
|
||||
this.nUDSixaxisXAntiDead.Increment = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
resources.ApplyResources(this.nUDSixaxisXAntiDead, "nUDSixaxisXAntiDead");
|
||||
this.nUDSixaxisXAntiDead.Maximum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nUDSixaxisXAntiDead.Name = "nUDSixaxisXAntiDead";
|
||||
this.nUDSixaxisXAntiDead.ValueChanged += new System.EventHandler(this.nUDSixaxisXAntiDead_ValueChanged);
|
||||
//
|
||||
// label20
|
||||
//
|
||||
resources.ApplyResources(this.label20, "label20");
|
||||
this.label20.Name = "label20";
|
||||
//
|
||||
// label19
|
||||
//
|
||||
resources.ApplyResources(this.label19, "label19");
|
||||
this.label19.Name = "label19";
|
||||
//
|
||||
// nUDR2AntiDead
|
||||
//
|
||||
this.nUDR2AntiDead.DecimalPlaces = 2;
|
||||
@ -3042,6 +3090,10 @@
|
||||
//
|
||||
// tPOutCurve
|
||||
//
|
||||
this.tPOutCurve.Controls.Add(this.cBR2OutputCurve);
|
||||
this.tPOutCurve.Controls.Add(this.cBL2OutputCurve);
|
||||
this.tPOutCurve.Controls.Add(this.label22);
|
||||
this.tPOutCurve.Controls.Add(this.label21);
|
||||
this.tPOutCurve.Controls.Add(this.rsOutCurveComboBox);
|
||||
this.tPOutCurve.Controls.Add(this.lsOutCurveComboBox);
|
||||
this.tPOutCurve.Controls.Add(this.label10);
|
||||
@ -3743,49 +3795,39 @@
|
||||
resources.ApplyResources(this.alwaysOnToolStripMenuItem, "alwaysOnToolStripMenuItem");
|
||||
this.alwaysOnToolStripMenuItem.CheckedChanged += new System.EventHandler(this.SATrigger_CheckedChanged);
|
||||
//
|
||||
// label19
|
||||
// label21
|
||||
//
|
||||
resources.ApplyResources(this.label19, "label19");
|
||||
this.label19.Name = "label19";
|
||||
resources.ApplyResources(this.label21, "label21");
|
||||
this.label21.Name = "label21";
|
||||
//
|
||||
// label20
|
||||
// label22
|
||||
//
|
||||
resources.ApplyResources(this.label20, "label20");
|
||||
this.label20.Name = "label20";
|
||||
resources.ApplyResources(this.label22, "label22");
|
||||
this.label22.Name = "label22";
|
||||
//
|
||||
// nUDSixaxisXAntiDead
|
||||
// cBL2OutputCurve
|
||||
//
|
||||
this.nUDSixaxisXAntiDead.DecimalPlaces = 2;
|
||||
this.nUDSixaxisXAntiDead.Increment = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
resources.ApplyResources(this.nUDSixaxisXAntiDead, "nUDSixaxisXAntiDead");
|
||||
this.nUDSixaxisXAntiDead.Maximum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nUDSixaxisXAntiDead.Name = "nUDSixaxisXAntiDead";
|
||||
this.nUDSixaxisXAntiDead.ValueChanged += new System.EventHandler(this.nUDSixaxisXAntiDead_ValueChanged);
|
||||
this.cBL2OutputCurve.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cBL2OutputCurve.FormattingEnabled = true;
|
||||
this.cBL2OutputCurve.Items.AddRange(new object[] {
|
||||
resources.GetString("cBL2OutputCurve.Items"),
|
||||
resources.GetString("cBL2OutputCurve.Items1"),
|
||||
resources.GetString("cBL2OutputCurve.Items2")});
|
||||
resources.ApplyResources(this.cBL2OutputCurve, "cBL2OutputCurve");
|
||||
this.cBL2OutputCurve.Name = "cBL2OutputCurve";
|
||||
this.cBL2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBL2OutputCurve_SelectedIndexChanged);
|
||||
//
|
||||
// nUDSixaxisZAntiDead
|
||||
// cBR2OutputCurve
|
||||
//
|
||||
this.nUDSixaxisZAntiDead.DecimalPlaces = 2;
|
||||
this.nUDSixaxisZAntiDead.Increment = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
resources.ApplyResources(this.nUDSixaxisZAntiDead, "nUDSixaxisZAntiDead");
|
||||
this.nUDSixaxisZAntiDead.Maximum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.nUDSixaxisZAntiDead.Name = "nUDSixaxisZAntiDead";
|
||||
this.nUDSixaxisZAntiDead.ValueChanged += new System.EventHandler(this.nUDSixaxisZAntiDead_ValueChanged);
|
||||
this.cBR2OutputCurve.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cBR2OutputCurve.FormattingEnabled = true;
|
||||
this.cBR2OutputCurve.Items.AddRange(new object[] {
|
||||
resources.GetString("cBR2OutputCurve.Items"),
|
||||
resources.GetString("cBR2OutputCurve.Items1"),
|
||||
resources.GetString("cBR2OutputCurve.Items2")});
|
||||
resources.ApplyResources(this.cBR2OutputCurve, "cBR2OutputCurve");
|
||||
this.cBR2OutputCurve.Name = "cBR2OutputCurve";
|
||||
this.cBR2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBR2OutputCurve_SelectedIndexChanged);
|
||||
//
|
||||
// Options
|
||||
//
|
||||
@ -3867,6 +3909,8 @@
|
||||
this.tPDeadzone.PerformLayout();
|
||||
this.antiDeadzoneTabPage.ResumeLayout(false);
|
||||
this.antiDeadzoneTabPage.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisZAntiDead)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisXAntiDead)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDR2AntiDead)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDL2AntiDead)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDRSAntiDead)).EndInit();
|
||||
@ -3906,8 +3950,6 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSXS)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSZS)).EndInit();
|
||||
this.cMGyroTriggers.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisXAntiDead)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nUDSixaxisZAntiDead)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@ -4240,5 +4282,9 @@
|
||||
private System.Windows.Forms.NumericUpDown nUDSixaxisXAntiDead;
|
||||
private System.Windows.Forms.Label label20;
|
||||
private System.Windows.Forms.Label label19;
|
||||
private System.Windows.Forms.Label label22;
|
||||
private System.Windows.Forms.Label label21;
|
||||
private System.Windows.Forms.ComboBox cBR2OutputCurve;
|
||||
private System.Windows.Forms.ComboBox cBL2OutputCurve;
|
||||
}
|
||||
}
|
@ -368,6 +368,8 @@ namespace DS4Windows
|
||||
btPollRateComboBox.SelectedIndex = getBTPollRate(device);
|
||||
lsOutCurveComboBox.SelectedIndex = getLsOutCurveMode(device);
|
||||
rsOutCurveComboBox.SelectedIndex = getRsOutCurveMode(device);
|
||||
cBL2OutputCurve.SelectedIndex = getL2OutCurveMode(device);
|
||||
cBR2OutputCurve.SelectedIndex = getR2OutCurveMode(device);
|
||||
|
||||
try
|
||||
{
|
||||
@ -657,6 +659,8 @@ namespace DS4Windows
|
||||
btPollRateComboBox.SelectedIndex = 4;
|
||||
lsOutCurveComboBox.SelectedIndex = 0;
|
||||
rsOutCurveComboBox.SelectedIndex = 0;
|
||||
cBL2OutputCurve.SelectedIndex = 0;
|
||||
cBR2OutputCurve.SelectedIndex = 0;
|
||||
rBTPMouse.Checked = true;
|
||||
rBSAControls.Checked = true;
|
||||
ToggleRainbow(false);
|
||||
@ -1348,6 +1352,8 @@ namespace DS4Windows
|
||||
BTPollRate[device] = btPollRateComboBox.SelectedIndex;
|
||||
lsOutCurveMode[device] = lsOutCurveComboBox.SelectedIndex;
|
||||
rsOutCurveMode[device] = rsOutCurveComboBox.SelectedIndex;
|
||||
l2OutCurveMode[device] = cBL2OutputCurve.SelectedIndex;
|
||||
r2OutCurveMode[device] = cBR2OutputCurve.SelectedIndex;
|
||||
L2Deadzone[device] = (byte)Math.Round((nUDL2.Value * 255), 0);
|
||||
R2Deadzone[device] = (byte)Math.Round((nUDR2.Value * 255), 0);
|
||||
L2AntiDeadzone[device] = (int)(nUDL2AntiDead.Value * 100);
|
||||
@ -2998,6 +3004,22 @@ namespace DS4Windows
|
||||
}
|
||||
}
|
||||
|
||||
private void cBL2OutputCurve_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (loading == false)
|
||||
{
|
||||
l2OutCurveMode[device] = cBL2OutputCurve.SelectedIndex;
|
||||
}
|
||||
}
|
||||
|
||||
private void cBR2OutputCurve_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (loading == false)
|
||||
{
|
||||
r2OutCurveMode[device] = cBR2OutputCurve.SelectedIndex;
|
||||
}
|
||||
}
|
||||
|
||||
private void Options_Resize(object sender, EventArgs e)
|
||||
{
|
||||
fLPSettings.AutoScroll = false;
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user