This commit is contained in:
mika-n 2019-08-24 18:56:08 +03:00
commit d71779f80e
7 changed files with 1494 additions and 137 deletions

View File

@ -160,6 +160,9 @@ namespace DS4Windows
static DS4SquareStick[] outSqrStk = new DS4SquareStick[4] { new DS4SquareStick(),
new DS4SquareStick(), new DS4SquareStick(), new DS4SquareStick()};
public static byte[] gyroStickX = new byte[4] { 128, 128, 128, 128 };
public static byte[] gyroStickY = new byte[4] { 128, 128, 128, 128 };
static ReaderWriterLockSlim syncStateLock = new ReaderWriterLockSlim();
public static SyntheticState globalState = new SyntheticState();
@ -1870,6 +1873,12 @@ namespace DS4Windows
MappedState.SASteeringWheelEmulationUnit = Mapping.Scale360degreeGyroAxis(device, eState, ctrl);
}
ref byte gyroTempX = ref gyroStickX[device];
if (gyroTempX != 128) MappedState.RX = gyroTempX;
ref byte gyroTempY = ref gyroStickY[device];
if (gyroTempY != 128) MappedState.RY = gyroTempY;
gyroTempX = gyroTempY = 128;
calculateFinalMouseMovement(ref tempMouseDeltaX, ref tempMouseDeltaY,
out mouseDeltaX, out mouseDeltaY);
if (mouseDeltaX != 0 || mouseDeltaY != 0)

View File

@ -75,7 +75,8 @@ namespace DS4Windows
public virtual void sixaxisMoved(DS4SixAxis sender, SixAxisEventArgs arg)
{
if (Global.isUsingSAforMouse(deviceNum) && Global.getGyroSensitivity(deviceNum) > 0)
GyroOutMode outMode = Global.GetGyroOutMode(deviceNum);
if (outMode == GyroOutMode.Mouse && Global.getGyroSensitivity(deviceNum) > 0)
{
s = dev.getCurrentStateRef();
@ -124,7 +125,192 @@ namespace DS4Windows
cursor.sixaxisMoved(arg);
else
cursor.mouseRemainderReset();
}
else if (outMode == GyroOutMode.MouseJoystick)
{
s = dev.getCurrentStateRef();
useReverseRatchet = Global.GetGyroMouseStickTriggerTurns(deviceNum);
int i = 0;
string[] ss = Global.GetSAMousestickTriggers(deviceNum).Split(',');
bool andCond = Global.GetSAMouseStickTriggerCond(deviceNum);
triggeractivated = andCond ? true : false;
if (!string.IsNullOrEmpty(ss[0]))
{
string s = string.Empty;
for (int index = 0, arlen = ss.Length; index < arlen; index++)
{
s = ss[index];
if (andCond && !(int.TryParse(s, out i) && getDS4ControlsByName(i)))
{
triggeractivated = false;
break;
}
else if (!andCond && int.TryParse(s, out i) && getDS4ControlsByName(i))
{
triggeractivated = true;
break;
}
}
}
previousTriggerActivated = triggeractivated;
if (toggleGyroMouse)
{
if (triggeractivated && triggeractivated != previousTriggerActivated)
{
currentToggleGyroM = !currentToggleGyroM;
}
previousTriggerActivated = triggeractivated;
triggeractivated = currentToggleGyroM;
}
else
{
previousTriggerActivated = triggeractivated;
}
if (useReverseRatchet && triggeractivated)
SixMouseStick(arg);
else if (!useReverseRatchet && !triggeractivated)
SixMouseStick(arg);
//else
// SixMouseReset(arg);
}
}
/*private const int GyroMouseStickDeadZone = 50;
private const int GyroMouseStickMaxZone = 880;
private const int GyroMouseStickFuzz = 20;
private const int SMOOTH_BUFFER_LEN = 3;
private int[] xSmoothBuffer = new int[SMOOTH_BUFFER_LEN];
private int[] ySmoothBuffer = new int[SMOOTH_BUFFER_LEN];
private int smoothBufferTail = 0;
private void SixMouseReset(SixAxisEventArgs args)
{
int iIndex = smoothBufferTail % SMOOTH_BUFFER_LEN;
xSmoothBuffer[iIndex] = 0;
ySmoothBuffer[iIndex] = 0;
smoothBufferTail = iIndex + 1;
}
*/
private void SixMouseStick(SixAxisEventArgs arg)
{
int deltaX = 0, deltaY = 0;
deltaX = Global.getGyroMouseStickHorizontalAxis(0) == 0 ? arg.sixAxis.gyroYawFull :
arg.sixAxis.gyroRollFull;
deltaY = -arg.sixAxis.gyroPitchFull;
//int inputX = deltaX, inputY = deltaY;
int maxDirX = deltaX >= 0 ? 127 : -128;
int maxDirY = deltaY >= 0 ? 127 : -128;
GyroMouseStickInfo msinfo = Global.GetGyroMouseStickInfo(deviceNum);
double tempAngle = Math.Atan2(-deltaY, deltaX);
double normX = Math.Abs(Math.Cos(tempAngle));
double normY = Math.Abs(Math.Sin(tempAngle));
int signX = Math.Sign(deltaX);
int signY = Math.Sign(deltaY);
int deadzoneX = (int)Math.Abs(normX * msinfo.deadZone);
int deadzoneY = (int)Math.Abs(normY * msinfo.deadZone);
int maxValX = signX * msinfo.maxZone;
int maxValY = signY * msinfo.maxZone;
double xratio = 0.0, yratio = 0.0;
double antiX = msinfo.antiDeadX * normX;
double antiY = msinfo.antiDeadY * normY;
if (Math.Abs(deltaX) > deadzoneX)
{
deltaX -= signX * deadzoneX;
deltaX = (deltaX < 0 && deltaX < maxValX) ? maxValX :
(deltaX > 0 && deltaX > maxValX) ? maxValX : deltaX;
//if (deltaX != maxValX) deltaX -= deltaX % (signX * GyroMouseFuzz);
}
else
{
deltaX = 0;
}
if (Math.Abs(deltaY) > deadzoneY)
{
deltaY -= signY * deadzoneY;
deltaY = (deltaY < 0 && deltaY < maxValY) ? maxValY :
(deltaY > 0 && deltaY > maxValY) ? maxValY : deltaY;
//if (deltaY != maxValY) deltaY -= deltaY % (signY * GyroMouseFuzz);
}
else
{
deltaY = 0;
}
/*int iIndex = smoothBufferTail % SMOOTH_BUFFER_LEN;
xSmoothBuffer[iIndex] = deltaX;
ySmoothBuffer[iIndex] = deltaY;
smoothBufferTail = iIndex + 1;
double currentWeight = 1.0;
double finalWeight = 0.0;
double x_out = 0.0, y_out = 0.0;
int idx = 0;
for (int i = 0; i < SMOOTH_BUFFER_LEN; i++)
{
idx = (smoothBufferTail - i - 1 + SMOOTH_BUFFER_LEN) % SMOOTH_BUFFER_LEN;
x_out += xSmoothBuffer[idx] * currentWeight;
y_out += ySmoothBuffer[idx] * currentWeight;
finalWeight += currentWeight;
currentWeight *= 0.5;
}
x_out /= finalWeight;
deltaX = (int)x_out;
y_out /= finalWeight;
deltaY = (int)y_out;
maxValX = deltaX < 0 ? -msinfo.maxZone : msinfo.maxZone;
maxValY = deltaY < 0 ? -msinfo.maxZone : msinfo.maxZone;
maxDirX = deltaX >= 0 ? 127 : -128;
maxDirY = deltaY >= 0 ? 127 : -128;
*/
if (deltaX != 0) xratio = deltaX / (double)maxValX;
if (deltaY != 0) yratio = deltaY / (double)maxValY;
double xNorm = 0.0, yNorm = 0.0;
if (xratio != 0.0)
{
xNorm = (1.0 - antiX) * xratio + antiX;
}
if (yratio != 0.0)
{
yNorm = (1.0 - antiY) * yratio + antiY;
}
if (msinfo.inverted != 0)
{
if ((msinfo.inverted & 1) == 1)
{
// Invert max dir value
maxDirX = deltaX >= 0 ? -128 : 127;
}
if ((msinfo.inverted & 2) == 2)
{
// Invert max dir value
maxDirY = deltaY >= 0 ? -128 : 127;
}
}
byte axisXOut = (byte)(xNorm * maxDirX + 128.0);
byte axisYOut = (byte)(yNorm * maxDirY + 128.0);
Mapping.gyroStickX[deviceNum] = axisXOut;
Mapping.gyroStickY[deviceNum] = axisYOut;
}
private bool getDS4ControlsByName(int key)

View File

@ -22,4 +22,19 @@ namespace DS4Windows
public int antiDeadZone;
public int maxZone = 100;
}
public class GyroMouseInfo
{
}
public class GyroMouseStickInfo
{
public int deadZone;
public int maxZone;
public double antiDeadX;
public double antiDeadY;
// Flags representing invert axis choices
public uint inverted;
}
}

View File

@ -23,6 +23,14 @@ namespace DS4Windows
public enum SASteeringWheelEmulationAxisType: byte { None = 0, LX, LY, RX, RY, L2R2, VJoy1X, VJoy1Y, VJoy1Z, VJoy2X, VJoy2Y, VJoy2Z };
public enum OutContType : uint { None = 0, X360, DS4 }
public enum GyroOutMode : uint
{
None,
Controls,
Mouse,
MouseJoystick,
}
public class DS4ControlSettings
{
public DS4Controls control;
@ -827,7 +835,7 @@ namespace DS4Windows
public static bool[] UseSAforMouse => m_Config.useSAforMouse;
public static bool isUsingSAforMouse(int index)
{
return m_Config.useSAforMouse[index];
return m_Config.gyroOutMode[index] == DS4Windows.GyroOutMode.Mouse;
}
public static string[] SATriggers => m_Config.sATriggers;
@ -846,6 +854,48 @@ namespace DS4Windows
m_Config.SetSaTriggerCond(index, text);
}
public static GyroOutMode[] GyroOutputMode => m_Config.gyroOutMode;
public static GyroOutMode GetGyroOutMode(int device)
{
return m_Config.gyroOutMode[device];
}
public static string[] SAMousestickTriggers => m_Config.sAMouseStickTriggers;
public static string GetSAMousestickTriggers(int device)
{
return m_Config.sAMouseStickTriggers[device];
}
public static bool[] SAMouseStickTriggerCond => m_Config.sAMouseStickTriggerCond;
public static bool GetSAMouseStickTriggerCond(int device)
{
return m_Config.sAMouseStickTriggerCond[device];
}
public static void SetSaMouseStickTriggerCond(int index, string text)
{
m_Config.SetSaMouseStickTriggerCond(index, text);
}
public static bool[] GyroMouseStickTriggerTurns = m_Config.gyroMouseStickTriggerTurns;
public static bool GetGyroMouseStickTriggerTurns(int device)
{
return m_Config.gyroMouseStickTriggerTurns[device];
}
public static int[] GyroMouseStickHorizontalAxis =>
m_Config.gyroMouseStickHorizontalAxis;
public static int getGyroMouseStickHorizontalAxis(int index)
{
return m_Config.gyroMouseStickHorizontalAxis[index];
}
public static GyroMouseStickInfo[] GyroMouseStickInf => m_Config.gyroMStickInfo;
public static GyroMouseStickInfo GetGyroMouseStickInfo(int device)
{
return m_Config.gyroMStickInfo[device];
}
public static SASteeringWheelEmulationAxisType[] SASteeringWheelEmulationAxis => m_Config.sASteeringWheelEmulationAxis;
public static SASteeringWheelEmulationAxisType GetSASteeringWheelEmulationAxis(int index)
{
@ -1831,8 +1881,20 @@ namespace DS4Windows
public bool[] startTouchpadOff = new bool[5] { false, false, false, false, false };
public bool[] useTPforControls = new bool[5] { false, false, false, false, false };
public bool[] useSAforMouse = new bool[5] { false, false, false, false, false };
public GyroOutMode[] gyroOutMode = new GyroOutMode[5] { GyroOutMode.Controls, GyroOutMode.Controls,
GyroOutMode.Controls, GyroOutMode.Controls, GyroOutMode.Controls };
public string[] sATriggers = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public string[] sAMouseStickTriggers = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public bool[] sATriggerCond = new bool[5] { true, true, true, true, true };
public bool[] sAMouseStickTriggerCond = new bool[5] { true, true, true, true, true };
public bool[] gyroMouseStickTriggerTurns = new bool[5] { true, true, true, true, true };
public GyroMouseStickInfo[] gyroMStickInfo = new GyroMouseStickInfo[5]
{
new GyroMouseStickInfo(), new GyroMouseStickInfo(),
new GyroMouseStickInfo(), new GyroMouseStickInfo(),
new GyroMouseStickInfo()
};
public SASteeringWheelEmulationAxisType[] sASteeringWheelEmulationAxis = new SASteeringWheelEmulationAxisType[5] { SASteeringWheelEmulationAxisType.None, SASteeringWheelEmulationAxisType.None, SASteeringWheelEmulationAxisType.None, SASteeringWheelEmulationAxisType.None, SASteeringWheelEmulationAxisType.None };
public int[] sASteeringWheelEmulationRange = new int[5] { 360, 360, 360, 360, 360 };
public int[][] touchDisInvertTriggers = new int[5][] { new int[1] { -1 }, new int[1] { -1 }, new int[1] { -1 },
@ -1892,6 +1954,9 @@ namespace DS4Windows
public bool[] gyroSmoothing = new bool[5] { false, false, false, false, false };
public double[] gyroSmoothWeight = new double[5] { 0.5, 0.5, 0.5, 0.5, 0.5 };
public int[] gyroMouseHorizontalAxis = new int[5] { 0, 0, 0, 0, 0 };
public int[] gyroMouseStickHorizontalAxis = new int[5] { 0, 0, 0, 0, 0 };
public bool[] trackballMode = new bool[5] { false, false, false, false, false };
public double[] trackballFriction = new double[5] { 10.0, 10.0, 10.0, 10.0, 10.0 };
public OutContType[] outputDevType = new OutContType[5] { OutContType.X360,
@ -1986,6 +2051,11 @@ namespace DS4Windows
sATriggerCond[index] = SaTriggerCondValue(text);
}
public void SetSaMouseStickTriggerCond(int index, string text)
{
sAMouseStickTriggerCond[index] = SaTriggerCondValue(text);
}
public void SetGyroMouseDZ(int index, int value, ControlService control)
{
gyroMouseDZ[index] = value;
@ -2028,6 +2098,56 @@ namespace DS4Windows
return id;
}
private void PortOldGyroSettings(int device)
{
if (gyroOutMode[device] == GyroOutMode.None)
{
gyroOutMode[device] = GyroOutMode.Controls;
}
}
private string GetGyroOutModeString(GyroOutMode mode)
{
string result = "None";
switch(mode)
{
case GyroOutMode.Controls:
result = "Controls";
break;
case GyroOutMode.Mouse:
result = "Mouse";
break;
case GyroOutMode.MouseJoystick:
result = "MouseJoystick";
break;
default:
break;
}
return result;
}
private GyroOutMode GetGyroOutModeType(string modeString)
{
GyroOutMode result = GyroOutMode.None;
switch(modeString)
{
case "Controls":
result = GyroOutMode.Controls;
break;
case "Mouse":
result = GyroOutMode.Mouse;
break;
case "MouseJoystick":
result = GyroOutMode.MouseJoystick;
break;
default:
break;
}
return result;
}
public bool SaveProfile(int device, string propath)
{
bool Saved = true;
@ -2119,6 +2239,8 @@ namespace DS4Windows
XmlNode xmlSASteeringWheelEmulationAxis = m_Xdoc.CreateNode(XmlNodeType.Element, "SASteeringWheelEmulationAxis", null); xmlSASteeringWheelEmulationAxis.InnerText = sASteeringWheelEmulationAxis[device].ToString("G"); Node.AppendChild(xmlSASteeringWheelEmulationAxis);
XmlNode xmlSASteeringWheelEmulationRange = m_Xdoc.CreateNode(XmlNodeType.Element, "SASteeringWheelEmulationRange", null); xmlSASteeringWheelEmulationRange.InnerText = sASteeringWheelEmulationRange[device].ToString(); Node.AppendChild(xmlSASteeringWheelEmulationRange);
XmlNode xmlTouchDisInvTriggers = m_Xdoc.CreateNode(XmlNodeType.Element, "TouchDisInvTriggers", null);
string tempTouchDisInv = string.Join(",", touchDisInvertTriggers[device]);
xmlTouchDisInvTriggers.InnerText = tempTouchDisInv;
@ -2133,6 +2255,18 @@ namespace DS4Windows
XmlNode xmlGyroMouseHAxis = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseHAxis", null); xmlGyroMouseHAxis.InnerText = gyroMouseHorizontalAxis[device].ToString(); Node.AppendChild(xmlGyroMouseHAxis);
XmlNode xmlGyroMouseDZ = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseDeadZone", null); xmlGyroMouseDZ.InnerText = gyroMouseDZ[device].ToString(); Node.AppendChild(xmlGyroMouseDZ);
XmlNode xmlGyroMouseToggle = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseToggle", null); xmlGyroMouseToggle.InnerText = gyroMouseToggle[device].ToString(); Node.AppendChild(xmlGyroMouseToggle);
XmlNode xmlGyroOutMode = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroOutputMode", null); xmlGyroOutMode.InnerText = GetGyroOutModeString(gyroOutMode[device]); Node.AppendChild(xmlGyroOutMode);
XmlNode xmlGyroMStickTriggers = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseStickTriggers", null); xmlGyroMStickTriggers.InnerText = sAMouseStickTriggers[device].ToString(); Node.AppendChild(xmlGyroMStickTriggers);
XmlNode xmlGyroMStickTriggerCond = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseStickTriggerCond", null); xmlGyroMStickTriggerCond.InnerText = SaTriggerCondString(sAMouseStickTriggerCond[device]); Node.AppendChild(xmlGyroMStickTriggerCond);
XmlNode xmlGyroMStickTriggerTurns = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseStickTriggerTurns", null); xmlGyroMStickTriggerTurns.InnerText = gyroMouseStickTriggerTurns[device].ToString(); Node.AppendChild(xmlGyroMStickTriggerTurns);
XmlNode xmlGyroMStickHAxis = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseStickHAxis", null); xmlGyroMStickHAxis.InnerText = gyroMouseStickHorizontalAxis[device].ToString(); Node.AppendChild(xmlGyroMStickHAxis);
XmlNode xmlGyroMStickDZ = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseStickDeadZone", null); xmlGyroMStickDZ.InnerText = gyroMStickInfo[device].deadZone.ToString(); Node.AppendChild(xmlGyroMStickDZ);
XmlNode xmlGyroMStickMaxZ = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseStickMaxZone", null); xmlGyroMStickMaxZ.InnerText = gyroMStickInfo[device].maxZone.ToString(); Node.AppendChild(xmlGyroMStickMaxZ);
XmlNode xmlGyroMStickAntiDX = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseStickAntiDeadX", null); xmlGyroMStickAntiDX.InnerText = gyroMStickInfo[device].antiDeadX.ToString(); Node.AppendChild(xmlGyroMStickAntiDX);
XmlNode xmlGyroMStickAntiDY = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseStickAntiDeadY", null); xmlGyroMStickAntiDY.InnerText = gyroMStickInfo[device].antiDeadY.ToString(); Node.AppendChild(xmlGyroMStickAntiDY);
XmlNode xmlGyroMStickInvert = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroMouseStickInvert", null); xmlGyroMStickInvert.InnerText = gyroMStickInfo[device].inverted.ToString(); Node.AppendChild(xmlGyroMStickInvert);
XmlNode xmlLSC = m_Xdoc.CreateNode(XmlNodeType.Element, "LSCurve", null); xmlLSC.InnerText = lsCurve[device].ToString(); Node.AppendChild(xmlLSC);
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);
@ -2973,8 +3107,13 @@ namespace DS4Windows
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/UseTPforControls"); bool.TryParse(Item.InnerText, out useTPforControls[device]); }
catch { useTPforControls[device] = false; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/UseSAforMouse"); bool.TryParse(Item.InnerText, out useSAforMouse[device]); }
catch { useSAforMouse[device] = false; missingSetting = true; }
try
{
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/UseSAforMouse");
bool.TryParse(Item.InnerText, out bool temp);
if (temp) gyroOutMode[device] = GyroOutMode.Mouse;
}
catch { gyroOutMode[device] = GyroOutMode.Controls; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SATriggers"); sATriggers[device] = Item.InnerText; }
catch { sATriggers[device] = ""; missingSetting = true; }
@ -2988,6 +3127,52 @@ namespace DS4Windows
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SASteeringWheelEmulationRange"); int.TryParse(Item.InnerText, out sASteeringWheelEmulationRange[device]); }
catch { sASteeringWheelEmulationRange[device] = 360; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroOutputMode"); GyroOutMode.TryParse(Item.InnerText, out gyroOutMode[device]); }
catch { PortOldGyroSettings(device); missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseStickTriggers"); sAMouseStickTriggers[device] = Item.InnerText; }
catch { sAMouseStickTriggers[device] = ""; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseStickTriggerCond"); sAMouseStickTriggerCond[device] = SaTriggerCondValue(Item.InnerText); }
catch { sAMouseStickTriggerCond[device] = true; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseStickTriggerTurns"); bool.TryParse(Item.InnerText, out gyroMouseStickTriggerTurns[device]); }
catch { gyroMouseStickTriggerTurns[device] = true; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseStickHAxis"); int temp = 0; int.TryParse(Item.InnerText, out temp); gyroMouseStickHorizontalAxis[device] = Math.Min(Math.Max(0, temp), 1); }
catch { gyroMouseStickHorizontalAxis[device] = 0; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseStickDeadZone"); int.TryParse(Item.InnerText, out int temp);
gyroMStickInfo[device].deadZone = temp; }
catch { gyroMStickInfo[device].deadZone = 30; missingSetting = true; }
try
{
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseStickMaxZone"); int.TryParse(Item.InnerText, out int temp);
gyroMStickInfo[device].maxZone = temp;
}
catch { gyroMStickInfo[device].maxZone = 840; missingSetting = true; }
try
{
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseStickAntiDeadX"); double.TryParse(Item.InnerText, out double temp);
gyroMStickInfo[device].antiDeadX = temp;
}
catch { gyroMStickInfo[device].antiDeadX = 0.4; missingSetting = true; }
try
{
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseStickAntiDeadY"); double.TryParse(Item.InnerText, out double temp);
gyroMStickInfo[device].antiDeadY = temp;
}
catch { gyroMStickInfo[device].antiDeadY = 0.4; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseStickInvert"); uint.TryParse(Item.InnerText, out gyroMStickInfo[device].inverted); }
catch { gyroMStickInfo[device].inverted = 0; missingSetting = true; }
try
{
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/TouchDisInvTriggers");
@ -3367,6 +3552,9 @@ namespace DS4Windows
containsCustomAction[device] = HasCustomActions(device);
containsCustomExtras[device] = HasCustomExtras(device);
if (device < 4)
Program.rootHub.touchPad[device]?.ResetToggleGyroM();
// If a device exists, make sure to transfer relevant profile device
// options to device instance
if (postLoad && device < 4)
@ -4361,6 +4549,12 @@ namespace DS4Windows
useSAforMouse[device] = false;
sATriggers[device] = string.Empty;
sATriggerCond[device] = true;
gyroOutMode[device] = GyroOutMode.Controls;
sAMouseStickTriggers[device] = string.Empty;
sAMouseStickTriggerCond[device] = true;
gyroMStickInfo[device].deadZone = 30; gyroMStickInfo[device].maxZone = 840;
gyroMStickInfo[device].antiDeadX = 0.4; gyroMStickInfo[device].antiDeadY = 0.4;
gyroMStickInfo[device].inverted = 0;
sASteeringWheelEmulationAxis[device] = SASteeringWheelEmulationAxisType.None;
sASteeringWheelEmulationRange[device] = 360;
touchDisInvertTriggers[device] = new int[1] { -1 };

View File

@ -195,6 +195,24 @@
this.lblSteeringWheelEmulationRange = new System.Windows.Forms.Label();
this.cBSteeringWheelEmulationRange = new System.Windows.Forms.ComboBox();
this.btnSteeringWheelEmulationCalibrate = new System.Windows.Forms.Button();
this.gyroMouseJoyFLP = new System.Windows.Forms.FlowLayoutPanel();
this.label36 = new System.Windows.Forms.Label();
this.btnGyroMStickTrig = new System.Windows.Forms.Button();
this.gyroMStickTrigBehaveCk = new System.Windows.Forms.CheckBox();
this.label29 = new System.Windows.Forms.Label();
this.gyroMouseStickDZ = new System.Windows.Forms.NumericUpDown();
this.label30 = new System.Windows.Forms.Label();
this.gyroMouseStickMaxZ = new System.Windows.Forms.NumericUpDown();
this.label31 = new System.Windows.Forms.Label();
this.gyroMouseStickAntiDeadX = new System.Windows.Forms.NumericUpDown();
this.label32 = new System.Windows.Forms.Label();
this.gyroMouseStickAntiDeadY = new System.Windows.Forms.NumericUpDown();
this.label35 = new System.Windows.Forms.Label();
this.gyroMouseStickEvalCombo = new System.Windows.Forms.ComboBox();
this.label33 = new System.Windows.Forms.Label();
this.gyroMousestickXAxisCom = new System.Windows.Forms.ComboBox();
this.gyroMouseStickInvertXCk = new System.Windows.Forms.CheckBox();
this.gyroMouseStickInvertYCk = new System.Windows.Forms.CheckBox();
this.tCControls = new System.Windows.Forms.TabControl();
this.tPControls = new System.Windows.Forms.TabPage();
this.lBControls = new System.Windows.Forms.ListBox();
@ -326,8 +344,8 @@
this.label13 = new System.Windows.Forms.Label();
this.fLPSettings = new System.Windows.Forms.FlowLayoutPanel();
this.gBGyro = new System.Windows.Forms.GroupBox();
this.rBSAControls = new System.Windows.Forms.RadioButton();
this.rBSAMouse = new System.Windows.Forms.RadioButton();
this.label34 = new System.Windows.Forms.Label();
this.gyroOutputMode = new System.Windows.Forms.ComboBox();
this.pnlSAMouse = new System.Windows.Forms.Panel();
this.toggleGyroMCb = new System.Windows.Forms.CheckBox();
this.label27 = new System.Windows.Forms.Label();
@ -452,6 +470,11 @@
this.pnlLSTrack.SuspendLayout();
this.pnlRSTrack.SuspendLayout();
this.fLPTiltControls.SuspendLayout();
this.gyroMouseJoyFLP.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gyroMouseStickDZ)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gyroMouseStickMaxZ)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gyroMouseStickAntiDeadX)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gyroMouseStickAntiDeadY)).BeginInit();
this.tCControls.SuspendLayout();
this.tPControls.SuspendLayout();
this.pnlController.SuspendLayout();
@ -2008,6 +2031,180 @@
this.btnSteeringWheelEmulationCalibrate.UseVisualStyleBackColor = true;
this.btnSteeringWheelEmulationCalibrate.Click += new System.EventHandler(this.btnSteeringWheelEmulationCalibrate_Click);
//
// gyroMouseJoyFLP
//
this.gyroMouseJoyFLP.Controls.Add(this.label36);
this.gyroMouseJoyFLP.Controls.Add(this.btnGyroMStickTrig);
this.gyroMouseJoyFLP.Controls.Add(this.gyroMStickTrigBehaveCk);
this.gyroMouseJoyFLP.Controls.Add(this.label29);
this.gyroMouseJoyFLP.Controls.Add(this.gyroMouseStickDZ);
this.gyroMouseJoyFLP.Controls.Add(this.label30);
this.gyroMouseJoyFLP.Controls.Add(this.gyroMouseStickMaxZ);
this.gyroMouseJoyFLP.Controls.Add(this.label31);
this.gyroMouseJoyFLP.Controls.Add(this.gyroMouseStickAntiDeadX);
this.gyroMouseJoyFLP.Controls.Add(this.label32);
this.gyroMouseJoyFLP.Controls.Add(this.gyroMouseStickAntiDeadY);
this.gyroMouseJoyFLP.Controls.Add(this.label35);
this.gyroMouseJoyFLP.Controls.Add(this.gyroMouseStickEvalCombo);
this.gyroMouseJoyFLP.Controls.Add(this.label33);
this.gyroMouseJoyFLP.Controls.Add(this.gyroMousestickXAxisCom);
this.gyroMouseJoyFLP.Controls.Add(this.gyroMouseStickInvertXCk);
this.gyroMouseJoyFLP.Controls.Add(this.gyroMouseStickInvertYCk);
resources.ApplyResources(this.gyroMouseJoyFLP, "gyroMouseJoyFLP");
this.gyroMouseJoyFLP.Name = "gyroMouseJoyFLP";
//
// label36
//
resources.ApplyResources(this.label36, "label36");
this.label36.Name = "label36";
//
// btnGyroMStickTrig
//
resources.ApplyResources(this.btnGyroMStickTrig, "btnGyroMStickTrig");
this.btnGyroMStickTrig.Name = "btnGyroMStickTrig";
this.btnGyroMStickTrig.UseVisualStyleBackColor = true;
this.btnGyroMStickTrig.Click += new System.EventHandler(this.BtnGyroMStickTrig_Click);
//
// gyroMStickTrigBehaveCk
//
this.gyroMStickTrigBehaveCk.Checked = true;
this.gyroMStickTrigBehaveCk.CheckState = System.Windows.Forms.CheckState.Checked;
resources.ApplyResources(this.gyroMStickTrigBehaveCk, "gyroMStickTrigBehaveCk");
this.gyroMStickTrigBehaveCk.Name = "gyroMStickTrigBehaveCk";
this.gyroMStickTrigBehaveCk.UseVisualStyleBackColor = true;
this.gyroMStickTrigBehaveCk.CheckedChanged += new System.EventHandler(this.GyroMStickTrigBehaveCk_CheckedChanged);
//
// label29
//
resources.ApplyResources(this.label29, "label29");
this.label29.Name = "label29";
//
// gyroMouseStickDZ
//
resources.ApplyResources(this.gyroMouseStickDZ, "gyroMouseStickDZ");
this.gyroMouseStickDZ.Maximum = new decimal(new int[] {
2000,
0,
0,
0});
this.gyroMouseStickDZ.Name = "gyroMouseStickDZ";
this.gyroMouseStickDZ.Value = new decimal(new int[] {
40,
0,
0,
0});
this.gyroMouseStickDZ.ValueChanged += new System.EventHandler(this.GyroMouseStickDZ_ValueChanged);
//
// label30
//
resources.ApplyResources(this.label30, "label30");
this.label30.Name = "label30";
//
// gyroMouseStickMaxZ
//
resources.ApplyResources(this.gyroMouseStickMaxZ, "gyroMouseStickMaxZ");
this.gyroMouseStickMaxZ.Maximum = new decimal(new int[] {
10000,
0,
0,
0});
this.gyroMouseStickMaxZ.Name = "gyroMouseStickMaxZ";
this.gyroMouseStickMaxZ.Value = new decimal(new int[] {
880,
0,
0,
0});
this.gyroMouseStickMaxZ.ValueChanged += new System.EventHandler(this.GyroMouseStickMaxZ_ValueChanged);
//
// label31
//
resources.ApplyResources(this.label31, "label31");
this.label31.Name = "label31";
//
// gyroMouseStickAntiDeadX
//
this.gyroMouseStickAntiDeadX.DecimalPlaces = 2;
resources.ApplyResources(this.gyroMouseStickAntiDeadX, "gyroMouseStickAntiDeadX");
this.gyroMouseStickAntiDeadX.Maximum = new decimal(new int[] {
1,
0,
0,
0});
this.gyroMouseStickAntiDeadX.Name = "gyroMouseStickAntiDeadX";
this.gyroMouseStickAntiDeadX.Value = new decimal(new int[] {
35,
0,
0,
131072});
this.gyroMouseStickAntiDeadX.ValueChanged += new System.EventHandler(this.GyroMouseStickAntiDeadX_ValueChanged);
//
// label32
//
resources.ApplyResources(this.label32, "label32");
this.label32.Name = "label32";
//
// gyroMouseStickAntiDeadY
//
this.gyroMouseStickAntiDeadY.DecimalPlaces = 2;
resources.ApplyResources(this.gyroMouseStickAntiDeadY, "gyroMouseStickAntiDeadY");
this.gyroMouseStickAntiDeadY.Maximum = new decimal(new int[] {
1,
0,
0,
0});
this.gyroMouseStickAntiDeadY.Name = "gyroMouseStickAntiDeadY";
this.gyroMouseStickAntiDeadY.Value = new decimal(new int[] {
35,
0,
0,
131072});
this.gyroMouseStickAntiDeadY.ValueChanged += new System.EventHandler(this.GyroMouseSStickAntiDeadY_ValueChanged);
//
// label35
//
resources.ApplyResources(this.label35, "label35");
this.label35.Name = "label35";
//
// gyroMouseStickEvalCombo
//
this.gyroMouseStickEvalCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.gyroMouseStickEvalCombo.FormattingEnabled = true;
this.gyroMouseStickEvalCombo.Items.AddRange(new object[] {
resources.GetString("gyroMouseStickEvalCombo.Items"),
resources.GetString("gyroMouseStickEvalCombo.Items1")});
resources.ApplyResources(this.gyroMouseStickEvalCombo, "gyroMouseStickEvalCombo");
this.gyroMouseStickEvalCombo.Name = "gyroMouseStickEvalCombo";
this.gyroMouseStickEvalCombo.SelectedIndexChanged += new System.EventHandler(this.GyroMouseStickEvalCombo_SelectedIndexChanged);
//
// label33
//
resources.ApplyResources(this.label33, "label33");
this.label33.Name = "label33";
//
// gyroMousestickXAxisCom
//
this.gyroMousestickXAxisCom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.gyroMousestickXAxisCom.FormattingEnabled = true;
this.gyroMousestickXAxisCom.Items.AddRange(new object[] {
resources.GetString("gyroMousestickXAxisCom.Items"),
resources.GetString("gyroMousestickXAxisCom.Items1")});
resources.ApplyResources(this.gyroMousestickXAxisCom, "gyroMousestickXAxisCom");
this.gyroMousestickXAxisCom.Name = "gyroMousestickXAxisCom";
//
// gyroMouseStickInvertXCk
//
resources.ApplyResources(this.gyroMouseStickInvertXCk, "gyroMouseStickInvertXCk");
this.gyroMouseStickInvertXCk.Name = "gyroMouseStickInvertXCk";
this.gyroMouseStickInvertXCk.UseVisualStyleBackColor = true;
this.gyroMouseStickInvertXCk.CheckedChanged += new System.EventHandler(this.GyroMouseStickInvert_CheckedChanged);
//
// gyroMouseStickInvertYCk
//
resources.ApplyResources(this.gyroMouseStickInvertYCk, "gyroMouseStickInvertYCk");
this.gyroMouseStickInvertYCk.Name = "gyroMouseStickInvertYCk";
this.gyroMouseStickInvertYCk.UseVisualStyleBackColor = true;
this.gyroMouseStickInvertYCk.CheckedChanged += new System.EventHandler(this.GyroMouseStickInvert_CheckedChanged);
//
// tCControls
//
this.tCControls.Controls.Add(this.tPControls);
@ -3553,29 +3750,31 @@
// gBGyro
//
this.gBGyro.BackColor = System.Drawing.SystemColors.Control;
this.gBGyro.Controls.Add(this.rBSAControls);
this.gBGyro.Controls.Add(this.rBSAMouse);
this.gBGyro.Controls.Add(this.gyroMouseJoyFLP);
this.gBGyro.Controls.Add(this.label34);
this.gBGyro.Controls.Add(this.gyroOutputMode);
this.gBGyro.Controls.Add(this.fLPTiltControls);
this.gBGyro.Controls.Add(this.pnlSAMouse);
resources.ApplyResources(this.gBGyro, "gBGyro");
this.gBGyro.Name = "gBGyro";
this.gBGyro.TabStop = false;
//
// rBSAControls
// label34
//
resources.ApplyResources(this.rBSAControls, "rBSAControls");
this.rBSAControls.Name = "rBSAControls";
this.rBSAControls.TabStop = true;
this.rBSAControls.UseVisualStyleBackColor = true;
this.rBSAControls.CheckedChanged += new System.EventHandler(this.useSAforMouse_CheckedChanged);
resources.ApplyResources(this.label34, "label34");
this.label34.Name = "label34";
//
// rBSAMouse
// gyroOutputMode
//
resources.ApplyResources(this.rBSAMouse, "rBSAMouse");
this.rBSAMouse.Name = "rBSAMouse";
this.rBSAMouse.TabStop = true;
this.rBSAMouse.UseVisualStyleBackColor = true;
this.rBSAMouse.CheckedChanged += new System.EventHandler(this.useSAforMouse_CheckedChanged);
this.gyroOutputMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.gyroOutputMode.FormattingEnabled = true;
this.gyroOutputMode.Items.AddRange(new object[] {
resources.GetString("gyroOutputMode.Items"),
resources.GetString("gyroOutputMode.Items1"),
resources.GetString("gyroOutputMode.Items2")});
resources.ApplyResources(this.gyroOutputMode, "gyroOutputMode");
this.gyroOutputMode.Name = "gyroOutputMode";
this.gyroOutputMode.SelectedIndexChanged += new System.EventHandler(this.GyroOutputMode_SelectedIndexChanged);
//
// pnlSAMouse
//
@ -4412,6 +4611,12 @@
this.pnlRSTrack.ResumeLayout(false);
this.fLPTiltControls.ResumeLayout(false);
this.fLPTiltControls.PerformLayout();
this.gyroMouseJoyFLP.ResumeLayout(false);
this.gyroMouseJoyFLP.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.gyroMouseStickDZ)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gyroMouseStickMaxZ)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gyroMouseStickAntiDeadX)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gyroMouseStickAntiDeadY)).EndInit();
this.tCControls.ResumeLayout(false);
this.tPControls.ResumeLayout(false);
this.pnlController.ResumeLayout(false);
@ -4641,8 +4846,6 @@
private System.Windows.Forms.Label lbSwipeLeft;
private System.Windows.Forms.Label lbSwipeRight;
private System.Windows.Forms.Panel pnlTPMouse;
private System.Windows.Forms.RadioButton rBSAControls;
private System.Windows.Forms.RadioButton rBSAMouse;
private System.Windows.Forms.Label lbGyroZN;
private System.Windows.Forms.Label lbGyroZP;
private System.Windows.Forms.Label lbGyroXP;
@ -4854,5 +5057,25 @@
private System.Windows.Forms.NumericUpDown RoundnessNUpDown;
private System.Windows.Forms.LinkLabel lbCurveEditorURL;
private System.Windows.Forms.TextBox tBCustomOutputCurve;
private System.Windows.Forms.FlowLayoutPanel gyroMouseJoyFLP;
private System.Windows.Forms.ComboBox gyroOutputMode;
private System.Windows.Forms.Label label29;
private System.Windows.Forms.NumericUpDown gyroMouseStickDZ;
private System.Windows.Forms.Label label30;
private System.Windows.Forms.NumericUpDown gyroMouseStickMaxZ;
private System.Windows.Forms.Label label31;
private System.Windows.Forms.NumericUpDown gyroMouseStickAntiDeadX;
private System.Windows.Forms.Label label32;
private System.Windows.Forms.NumericUpDown gyroMouseStickAntiDeadY;
private System.Windows.Forms.Label label33;
private System.Windows.Forms.ComboBox gyroMousestickXAxisCom;
private System.Windows.Forms.CheckBox gyroMouseStickInvertXCk;
private System.Windows.Forms.CheckBox gyroMouseStickInvertYCk;
private System.Windows.Forms.Label label34;
private System.Windows.Forms.Label label36;
private System.Windows.Forms.Button btnGyroMStickTrig;
private System.Windows.Forms.CheckBox gyroMStickTrigBehaveCk;
private System.Windows.Forms.Label label35;
private System.Windows.Forms.ComboBox gyroMouseStickEvalCombo;
}
}

View File

@ -56,10 +56,10 @@ namespace DS4Windows.Forms
root = rt;
btnRumbleHeavyTest.Text = Properties.Resources.TestHText;
btnRumbleLightTest.Text = Properties.Resources.TestLText;
rBTPControls.Text = rBSAControls.Text;
rBTPMouse.Text = rBSAMouse.Text;
rBTPControls.Location = rBSAControls.Location;
rBTPMouse.Location = rBSAMouse.Location;
//rBTPControls.Text = rBSAControls.Text;
//rBTPMouse.Text = rBSAMouse.Text;
//rBTPControls.Location = rBSAControls.Location;
//rBTPMouse.Location = rBSAMouse.Location;
Visible = false;
colored = btnRainbow.Image;
greyscale = GreyscaleImage((Bitmap)btnRainbow.Image);
@ -702,8 +702,29 @@ namespace DS4Windows.Forms
cbStartTouchpadOff.Checked = StartTouchpadOff[device];
rBTPControls.Checked = UseTPforControls[device];
rBTPMouse.Checked = !UseTPforControls[device];
rBSAMouse.Checked = UseSAforMouse[device];
rBSAControls.Checked = !UseSAforMouse[device];
GyroOutMode gyroOut = GyroOutputMode[device];
if (gyroOut == GyroOutMode.Mouse)
{
pnlSAMouse.Visible = true;
fLPTiltControls.Visible = false;
gyroMouseJoyFLP.Visible = false;
gyroOutputMode.SelectedIndex = 1;
}
else if (gyroOut == GyroOutMode.Controls)
{
pnlSAMouse.Visible = false;
fLPTiltControls.Visible = true;
gyroMouseJoyFLP.Visible = false;
gyroOutputMode.SelectedIndex = 0;
}
else if (gyroOut == GyroOutMode.MouseJoystick)
{
pnlSAMouse.Visible = false;
fLPTiltControls.Visible = false;
gyroMouseJoyFLP.Visible = true;
gyroOutputMode.SelectedIndex = 2;
}
nUDLSCurve.Value = LSCurve[device];
nUDRSCurve.Value = RSCurve[device];
cBControllerInput.Checked = DS4Mapping;
@ -714,47 +735,23 @@ namespace DS4Windows.Forms
Program.rootHub.touchPad[device]?.ResetTrackAccel(TrackballFriction[device]);
}
for (int i = 0, arlen = cMGyroTriggers.Items.Count; i < arlen; i++)
{
((ToolStripMenuItem)cMGyroTriggers.Items[i]).Checked = false;
}
ResetGyroTriggers(true);
for (int i = 0, arlen = cMTouchDisableInvert.Items.Count; i < arlen; i++)
{
((ToolStripMenuItem)cMTouchDisableInvert.Items[i]).Checked = false;
}
string[] satriggers = SATriggers[device].Split(',');
string[] satriggers;
satriggers = SATriggers[device].Split(',');
btnGyroTriggers.Text = GetGyroTriggerActionString(ref satriggers);
if (gyroOut == GyroOutMode.Mouse) MarkCurrentGyroTriggers(ref satriggers, true);
satriggers = SAMousestickTriggers[device].Split(',');
btnGyroMStickTrig.Text = GetGyroTriggerActionString(ref satriggers);
if (gyroOut == GyroOutMode.MouseJoystick) MarkCurrentGyroTriggers(ref satriggers, true);
List<string> s = new List<string>();
int gyroTriggerCount = cMGyroTriggers.Items.Count;
for (int i = 0, satrigLen = satriggers.Length; i < satrigLen; i++)
{
int tr = 0;
if (int.TryParse(satriggers[i], out tr))
{
if (tr < gyroTriggerCount && tr > -1)
{
((ToolStripMenuItem)cMGyroTriggers.Items[tr]).Checked = true;
s.Add(cMGyroTriggers.Items[tr].Text);
}
else
{
((ToolStripMenuItem)cMGyroTriggers.Items[gyroTriggerCount - 1]).Checked = true;
s.Add(cMGyroTriggers.Items[gyroTriggerCount - 1].Text);
break;
}
}
else
{
((ToolStripMenuItem)cMGyroTriggers.Items[gyroTriggerCount - 1]).Checked = true;
s.Add(cMGyroTriggers.Items[gyroTriggerCount - 1].Text);
break;
}
}
btnGyroTriggers.Text = string.Join(", ", s);
s.Clear();
int[] touchDisInvTriggers = TouchDisInvertTriggers[device];
int touchDisableInvCount = cMTouchDisableInvert.Items.Count;
for (int i = 0, trigLen = touchDisInvTriggers.Length; i < trigLen; i++)
@ -806,6 +803,17 @@ namespace DS4Windows.Forms
defaults = xboxDefaults;
break;
}
gyroMStickTrigBehaveCk.Checked = GyroMouseStickTriggerTurns[device];
gyroMouseStickEvalCombo.SelectedIndex = SAMouseStickTriggerCond[device] ? 0 : 1;
GyroMouseStickInfo gyroMouseStickInfo = GyroMouseStickInf[device];
gyroMouseStickDZ.Value = gyroMouseStickInfo.deadZone;
gyroMouseStickMaxZ.Value = gyroMouseStickInfo.maxZone;
gyroMouseStickAntiDeadX.Value = (decimal)gyroMouseStickInfo.antiDeadX;
gyroMouseStickAntiDeadY.Value = (decimal)gyroMouseStickInfo.antiDeadY;
gyroMousestickXAxisCom.SelectedIndex = GyroMouseStickHorizontalAxis[device];
gyroMouseStickInvertXCk.Checked = (gyroMouseStickInfo.inverted & 1) == 1;
gyroMouseStickInvertYCk.Checked = (gyroMouseStickInfo.inverted & 2) == 2;
}
else
{
@ -824,11 +832,11 @@ namespace DS4Windows.Forms
tBCustomOutputCurve.Enabled = lbCurveEditorURL.Enabled = false;
rBTPMouse.Checked = true;
rBSAControls.Checked = true;
//rBSAControls.Checked = true;
ToggleRainbow(false);
cBDinput.Checked = false;
cbStartTouchpadOff.Checked = false;
rBSAControls.Checked = true;
//rBSAControls.Checked = true;
rBTPMouse.Checked = true;
switch (device)
@ -912,10 +920,7 @@ namespace DS4Windows.Forms
Program.rootHub.touchPad[device]?.ResetTrackAccel(10.0);
}
for (int i = 0, arlen = cMGyroTriggers.Items.Count - 1; i < arlen; i++)
{
((ToolStripMenuItem)cMGyroTriggers.Items[i]).Checked = false;
}
ResetGyroTriggers(true);
((ToolStripMenuItem)cMGyroTriggers.Items[cMGyroTriggers.Items.Count - 1]).Checked = true;
for (int i = 0, arlen = cMTouchDisableInvert.Items.Count; i < arlen; i++)
@ -937,6 +942,18 @@ namespace DS4Windows.Forms
cBSteeringWheelEmulationAxis.SelectedIndex = 0;
cBSteeringWheelEmulationRange.SelectedIndex = cBSteeringWheelEmulationRange.Items.IndexOf("360");
OutContTypeCb.SelectedIndex = 0;
gyroOutputMode.SelectedIndex = 0;
gyroMStickTrigBehaveCk.Checked = true;
gyroMouseStickEvalCombo.SelectedIndex = 0;
gyroMouseStickDZ.Value = 30;
gyroMouseStickMaxZ.Value = 840;
gyroMouseStickAntiDeadX.Value = 0.4m;
gyroMouseStickAntiDeadY.Value = 0.4m;
gyroMousestickXAxisCom.SelectedIndex = 0;
gyroMouseStickInvertXCk.Checked = false;
gyroMouseStickInvertYCk.Checked = false;
Set();
}
@ -1017,6 +1034,77 @@ namespace DS4Windows.Forms
btnSATrackS.Visible = on;
}
private void ResetGyroTriggers(bool loadstate = false)
{
loading = true;
for (int i = 0, arlen = cMGyroTriggers.Items.Count; i < arlen; i++)
{
((ToolStripMenuItem)cMGyroTriggers.Items[i]).Checked = false;
}
loading = loadstate;
}
private string GetGyroTriggerActionString(ref string[] satriggers)
{
List<string> s = new List<string>();
int gyroTriggerCount = cMGyroTriggers.Items.Count;
for (int i = 0, satrigLen = satriggers.Length; i < satrigLen; i++)
{
int tr = 0;
if (int.TryParse(satriggers[i], out tr))
{
if (tr < gyroTriggerCount && tr > -1)
{
s.Add(cMGyroTriggers.Items[tr].Text);
}
else
{
s.Add(cMGyroTriggers.Items[gyroTriggerCount - 1].Text);
break;
}
}
else
{
s.Add(cMGyroTriggers.Items[gyroTriggerCount - 1].Text);
break;
}
}
string result = string.Join(", ", s);
return result;
}
private void MarkCurrentGyroTriggers(ref string[] satriggers, bool loadstate = false)
{
loading = true;
int gyroTriggerCount = cMGyroTriggers.Items.Count;
((ToolStripMenuItem)cMGyroTriggers.Items[gyroTriggerCount - 1]).Checked = false;
for (int i = 0, satrigLen = satriggers.Length; i < satrigLen; i++)
{
int tr = 0;
if (int.TryParse(satriggers[i], out tr))
{
if (tr < gyroTriggerCount && tr > -1)
{
((ToolStripMenuItem)cMGyroTriggers.Items[tr]).Checked = true;
}
else
{
((ToolStripMenuItem)cMGyroTriggers.Items[gyroTriggerCount - 1]).Checked = true;
break;
}
}
else
{
((ToolStripMenuItem)cMGyroTriggers.Items[gyroTriggerCount - 1]).Checked = true;
break;
}
}
loading = loadstate;
}
private void ControllerReadout_Tick(object sender, EventArgs e)
{
// MEMS gyro data is all calibrated to roughly -1G..1G for values -0x2000..0x1fff
@ -1348,7 +1436,7 @@ namespace DS4Windows.Forms
DinputOnly[device] = cBDinput.Checked;
StartTouchpadOff[device] = cbStartTouchpadOff.Checked;
UseTPforControls[device] = rBTPControls.Checked;
UseSAforMouse[device] = rBSAMouse.Checked;
//UseSAforMouse[device] = rBSAMouse.Checked;
DS4Mapping = cBControllerInput.Checked;
LSCurve[device] = (int)Math.Round(nUDLSCurve.Value, 0);
RSCurve[device] = (int)Math.Round(nUDRSCurve.Value, 0);
@ -1364,8 +1452,9 @@ namespace DS4Windows.Forms
calculateProfileActionDicts(device);
cacheProfileCustomsFlags(device);
pnlTPMouse.Visible = rBTPMouse.Checked;
pnlSAMouse.Visible = rBSAMouse.Checked;
fLPTiltControls.Visible = rBSAControls.Checked;
pnlSAMouse.Visible = false;
fLPTiltControls.Visible = false;
gyroMouseJoyFLP.Visible = false;
fLPTouchSwipe.Visible = rBTPControls.Checked;
TrackballMode[device] = trackballCk.Checked;
TrackballFriction[device] = (double)trackFrictionNUD.Value;
@ -1393,7 +1482,7 @@ namespace DS4Windows.Forms
GyroInvert[device] = invert;
List<int> ints = new List<int>();
for (int i = 0, trigLen = cMGyroTriggers.Items.Count - 1; i < trigLen; i++)
/*for (int i = 0, trigLen = cMGyroTriggers.Items.Count - 1; i < trigLen; i++)
{
if (((ToolStripMenuItem)cMGyroTriggers.Items[i]).Checked)
ints.Add(i);
@ -1404,6 +1493,7 @@ namespace DS4Windows.Forms
SATriggers[device] = string.Join(",", ints);
SetSaTriggerCond(device, triggerCondAndCombo.SelectedItem.ToString().ToLower());
*/
ints.Clear();
for (int i = 0, trigLen = cMTouchDisableInvert.Items.Count; i < trigLen; i++)
@ -1433,6 +1523,44 @@ namespace DS4Windows.Forms
{
Global.OutContType[device] = tempType;
}
switch (gyroOutputMode.SelectedIndex)
{
case 0:
GyroOutputMode[device] = GyroOutMode.Controls;
break;
case 1:
GyroOutputMode[device] = GyroOutMode.Mouse;
break;
case 2:
GyroOutputMode[device] = GyroOutMode.MouseJoystick;
break;
default:
break;
}
GyroMouseStickTriggerTurns[device] = gyroMStickTrigBehaveCk.Checked;
SetSaMouseStickTriggerCond(device,
gyroMouseStickEvalCombo.SelectedItem.ToString().ToLower());
if (GyroMouseStickDead())
{
GyroMouseStickInf[device].deadZone = (int)gyroMouseStickDZ.Value;
GyroMouseStickInf[device].maxZone = (int)gyroMouseStickMaxZ.Value;
}
else
{
GyroMouseStickInf[device].deadZone = (int)gyroMouseStickMaxZ.Value;
GyroMouseStickInf[device].maxZone = (int)gyroMouseStickMaxZ.Value;
}
GyroMouseStickInf[device].antiDeadX = (double)gyroMouseStickAntiDeadX.Value;
GyroMouseStickInf[device].antiDeadY = (double)gyroMouseStickAntiDeadY.Value;
GyroMouseStickHorizontalAxis[device] = gyroMousestickXAxisCom.SelectedIndex;
uint tempInvert = 0;
if (gyroMouseStickInvertXCk.Checked) tempInvert |= 1 << 0;
if (gyroMouseStickInvertYCk.Checked) tempInvert |= 1 << 1;
GyroMouseStickInf[device].inverted = tempInvert;
}
private void Show_ControlsBtn(object sender, EventArgs e)
@ -2678,12 +2806,13 @@ namespace DS4Windows.Forms
DS4LightBar.forcelight[device] = false;
}
private void useSAforMouse_CheckedChanged(object sender, EventArgs e)
/*private void useSAforMouse_CheckedChanged(object sender, EventArgs e)
{
UseSAforMouse[device] = rBSAMouse.Checked;
pnlSAMouse.Visible = rBSAMouse.Checked;
fLPTiltControls.Visible = rBSAControls.Checked;
}
*/
private void btnGyroTriggers_Click(object sender, EventArgs e)
{
@ -2722,9 +2851,19 @@ namespace DS4Windows.Forms
s.Add(cMGyroTriggers.Items[gyroTriggerCount - 1].Text);
}
SATriggers[device] = string.Join(",", ints);
if (s.Count > 0)
btnGyroTriggers.Text = string.Join(", ", s);
int gyroOutIdx = gyroOutputMode.SelectedIndex;
if (gyroOutIdx == 1)
{
SATriggers[device] = string.Join(",", ints);
if (s.Count > 0)
btnGyroTriggers.Text = string.Join(", ", s);
}
else if (gyroOutIdx == 2)
{
SAMousestickTriggers[device] = string.Join(",", ints);
if (s.Count > 0)
btnGyroMStickTrig.Text = string.Join(", ", s);
}
}
}
@ -3400,6 +3539,129 @@ namespace DS4Windows.Forms
}
}
private void GyroOutputMode_SelectedIndexChanged(object sender, EventArgs e)
{
if (loading == false)
{
int choice = gyroOutputMode.SelectedIndex;
if (choice == 0)
{
fLPTiltControls.Visible = true;
pnlSAMouse.Visible = false;
gyroMouseJoyFLP.Visible = false;
}
else if (choice == 1)
{
fLPTiltControls.Visible = false;
pnlSAMouse.Visible = true;
gyroMouseJoyFLP.Visible = false;
ResetGyroTriggers();
string[] satriggers = SATriggers[device].Split(',');
MarkCurrentGyroTriggers(ref satriggers);
}
else if (choice == 2)
{
fLPTiltControls.Visible = false;
pnlSAMouse.Visible = false;
gyroMouseJoyFLP.Visible = true;
ResetGyroTriggers();
string[] satriggers = SAMousestickTriggers[device].Split(',');
MarkCurrentGyroTriggers(ref satriggers);
}
switch(choice)
{
case 0:
GyroOutputMode[device] = GyroOutMode.Controls;
break;
case 1:
GyroOutputMode[device] = GyroOutMode.Mouse;
break;
case 2:
GyroOutputMode[device] = GyroOutMode.MouseJoystick;
break;
default:
break;
}
if (device < 4)
Program.rootHub.touchPad[device]?.ResetToggleGyroM();
}
}
private void BtnGyroMStickTrig_Click(object sender, EventArgs e)
{
Control button = (Control)sender;
cMGyroTriggers.Show(button, new Point(0, button.Height));
}
private void GyroMStickTrigBehaveCk_CheckedChanged(object sender, EventArgs e)
{
if (!loading)
{
GyroMouseStickTriggerTurns[device] = gyroMStickTrigBehaveCk.Checked;
if (device < 4)
Program.rootHub.touchPad[device]?.ResetToggleGyroM();
}
}
private void GyroMouseStickEvalCombo_SelectedIndexChanged(object sender, EventArgs e)
{
if (loading == false)
{
string temp = gyroMouseStickEvalCombo.SelectedItem.ToString();
SetSaMouseStickTriggerCond(device, temp);
}
}
private void GyroMouseStickDZ_ValueChanged(object sender, EventArgs e)
{
if (loading == false && GyroMouseStickDead())
{
GyroMouseStickInf[device].deadZone = (int)gyroMouseStickDZ.Value;
}
}
private void GyroMouseStickMaxZ_ValueChanged(object sender, EventArgs e)
{
if (loading == false && GyroMouseStickDead())
{
GyroMouseStickInf[device].maxZone = (int)gyroMouseStickMaxZ.Value;
}
}
private bool GyroMouseStickDead()
{
return gyroMouseStickDZ.Value <= gyroMouseStickMaxZ.Value;
}
private void GyroMouseStickAntiDeadX_ValueChanged(object sender, EventArgs e)
{
if (loading == false)
{
GyroMouseStickInf[device].antiDeadX = (double)gyroMouseStickAntiDeadX.Value;
}
}
private void GyroMouseSStickAntiDeadY_ValueChanged(object sender, EventArgs e)
{
if (loading == false)
{
GyroMouseStickInf[device].antiDeadY = (double)gyroMouseStickAntiDeadY.Value;
}
}
private void GyroMouseStickInvert_CheckedChanged(object sender, EventArgs e)
{
if (loading == false)
{
uint value = 0;
if (gyroMouseStickInvertXCk.Checked) value |= 1 << 0;
if (gyroMouseStickInvertYCk.Checked) value |= 1 << 1;
GyroMouseStickInf[device].inverted = value;
}
}
private void trackFrictionNUD_ValueChanged(object sender, EventArgs e)
{
if (loading == false)

View File

@ -4327,10 +4327,10 @@
<value>12</value>
</data>
<data name="fLPTiltControls.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 43</value>
<value>6, 47</value>
</data>
<data name="fLPTiltControls.Size" type="System.Drawing.Size, System.Drawing">
<value>271, 203</value>
<value>271, 195</value>
</data>
<data name="fLPTiltControls.TabIndex" type="System.Int32, mscorlib">
<value>254</value>
@ -4345,8 +4345,485 @@
<value>gBGyro</value>
</data>
<data name="&gt;&gt;fLPTiltControls.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="label36.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label36.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label36.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<data name="label36.Size" type="System.Drawing.Size, System.Drawing">
<value>48, 13</value>
</data>
<data name="label36.TabIndex" type="System.Int32, mscorlib">
<value>275</value>
</data>
<data name="label36.Text" xml:space="preserve">
<value>Triggers:</value>
</data>
<data name="label36.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>TopRight</value>
</data>
<data name="&gt;&gt;label36.Name" xml:space="preserve">
<value>label36</value>
</data>
<data name="&gt;&gt;label36.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label36.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;label36.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnGyroMStickTrig.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="btnGyroMStickTrig.Location" type="System.Drawing.Point, System.Drawing">
<value>56, 2</value>
</data>
<data name="btnGyroMStickTrig.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="btnGyroMStickTrig.Size" type="System.Drawing.Size, System.Drawing">
<value>160, 25</value>
</data>
<data name="btnGyroMStickTrig.TabIndex" type="System.Int32, mscorlib">
<value>274</value>
</data>
<data name="btnGyroMStickTrig.Text" xml:space="preserve">
<value>None</value>
</data>
<data name="&gt;&gt;btnGyroMStickTrig.Name" xml:space="preserve">
<value>btnGyroMStickTrig</value>
</data>
<data name="&gt;&gt;btnGyroMStickTrig.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnGyroMStickTrig.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;btnGyroMStickTrig.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="gyroMStickTrigBehaveCk.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="gyroMStickTrigBehaveCk.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 32</value>
</data>
<data name="gyroMStickTrigBehaveCk.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
<value>No</value>
</data>
<data name="gyroMStickTrigBehaveCk.Size" type="System.Drawing.Size, System.Drawing">
<value>188, 17</value>
</data>
<data name="gyroMStickTrigBehaveCk.TabIndex" type="System.Int32, mscorlib">
<value>276</value>
</data>
<data name="gyroMStickTrigBehaveCk.Text" xml:space="preserve">
<value>Trigger Behavior - Turns Gyro</value>
</data>
<data name="&gt;&gt;gyroMStickTrigBehaveCk.Name" xml:space="preserve">
<value>gyroMStickTrigBehaveCk</value>
</data>
<data name="&gt;&gt;gyroMStickTrigBehaveCk.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gyroMStickTrigBehaveCk.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;gyroMStickTrigBehaveCk.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="label29.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label29.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 52</value>
</data>
<data name="label29.Size" type="System.Drawing.Size, System.Drawing">
<value>64, 13</value>
</data>
<data name="label29.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label29.Text" xml:space="preserve">
<value>Dead Zone:</value>
</data>
<data name="&gt;&gt;label29.Name" xml:space="preserve">
<value>label29</value>
</data>
<data name="&gt;&gt;label29.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label29.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;label29.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="gyroMouseStickDZ.Location" type="System.Drawing.Point, System.Drawing">
<value>73, 55</value>
</data>
<data name="gyroMouseStickDZ.Size" type="System.Drawing.Size, System.Drawing">
<value>41, 20</value>
</data>
<data name="gyroMouseStickDZ.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;gyroMouseStickDZ.Name" xml:space="preserve">
<value>gyroMouseStickDZ</value>
</data>
<data name="&gt;&gt;gyroMouseStickDZ.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gyroMouseStickDZ.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;gyroMouseStickDZ.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="label30.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label30.Location" type="System.Drawing.Point, System.Drawing">
<value>120, 52</value>
</data>
<data name="label30.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 13</value>
</data>
<data name="label30.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="label30.Text" xml:space="preserve">
<value>Max Zone:</value>
</data>
<data name="&gt;&gt;label30.Name" xml:space="preserve">
<value>label30</value>
</data>
<data name="&gt;&gt;label30.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label30.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;label30.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="gyroMouseStickMaxZ.Location" type="System.Drawing.Point, System.Drawing">
<value>184, 55</value>
</data>
<data name="gyroMouseStickMaxZ.Size" type="System.Drawing.Size, System.Drawing">
<value>48, 20</value>
</data>
<data name="gyroMouseStickMaxZ.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;gyroMouseStickMaxZ.Name" xml:space="preserve">
<value>gyroMouseStickMaxZ</value>
</data>
<data name="&gt;&gt;gyroMouseStickMaxZ.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gyroMouseStickMaxZ.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;gyroMouseStickMaxZ.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="label31.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label31.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 78</value>
</data>
<data name="label31.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 13</value>
</data>
<data name="label31.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="label31.Text" xml:space="preserve">
<value>Minimum X:</value>
</data>
<data name="&gt;&gt;label31.Name" xml:space="preserve">
<value>label31</value>
</data>
<data name="&gt;&gt;label31.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label31.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;label31.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="gyroMouseStickAntiDeadX.Location" type="System.Drawing.Point, System.Drawing">
<value>70, 81</value>
</data>
<data name="gyroMouseStickAntiDeadX.Size" type="System.Drawing.Size, System.Drawing">
<value>50, 20</value>
</data>
<data name="gyroMouseStickAntiDeadX.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;gyroMouseStickAntiDeadX.Name" xml:space="preserve">
<value>gyroMouseStickAntiDeadX</value>
</data>
<data name="&gt;&gt;gyroMouseStickAntiDeadX.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gyroMouseStickAntiDeadX.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;gyroMouseStickAntiDeadX.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="label32.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label32.Location" type="System.Drawing.Point, System.Drawing">
<value>126, 78</value>
</data>
<data name="label32.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 13</value>
</data>
<data name="label32.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="label32.Text" xml:space="preserve">
<value>Minimum Y:</value>
</data>
<data name="&gt;&gt;label32.Name" xml:space="preserve">
<value>label32</value>
</data>
<data name="&gt;&gt;label32.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label32.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;label32.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="gyroMouseStickAntiDeadY.Location" type="System.Drawing.Point, System.Drawing">
<value>193, 81</value>
</data>
<data name="gyroMouseStickAntiDeadY.Size" type="System.Drawing.Size, System.Drawing">
<value>49, 20</value>
</data>
<data name="gyroMouseStickAntiDeadY.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;gyroMouseStickAntiDeadY.Name" xml:space="preserve">
<value>gyroMouseStickAntiDeadY</value>
</data>
<data name="&gt;&gt;gyroMouseStickAntiDeadY.Type" xml:space="preserve">
<value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gyroMouseStickAntiDeadY.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;gyroMouseStickAntiDeadY.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="label35.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label35.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label35.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 104</value>
</data>
<data name="label35.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 13</value>
</data>
<data name="label35.TabIndex" type="System.Int32, mscorlib">
<value>278</value>
</data>
<data name="label35.Text" xml:space="preserve">
<value>Eval Cond:</value>
</data>
<data name="&gt;&gt;label35.Name" xml:space="preserve">
<value>label35</value>
</data>
<data name="&gt;&gt;label35.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label35.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;label35.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="gyroMouseStickEvalCombo.Items" xml:space="preserve">
<value>And</value>
</data>
<data name="gyroMouseStickEvalCombo.Items1" xml:space="preserve">
<value>Or</value>
</data>
<data name="gyroMouseStickEvalCombo.Location" type="System.Drawing.Point, System.Drawing">
<value>68, 107</value>
</data>
<data name="gyroMouseStickEvalCombo.Size" type="System.Drawing.Size, System.Drawing">
<value>72, 21</value>
</data>
<data name="gyroMouseStickEvalCombo.TabIndex" type="System.Int32, mscorlib">
<value>277</value>
</data>
<data name="&gt;&gt;gyroMouseStickEvalCombo.Name" xml:space="preserve">
<value>gyroMouseStickEvalCombo</value>
</data>
<data name="&gt;&gt;gyroMouseStickEvalCombo.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gyroMouseStickEvalCombo.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;gyroMouseStickEvalCombo.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="label33.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label33.Location" type="System.Drawing.Point, System.Drawing">
<value>146, 104</value>
</data>
<data name="label33.Size" type="System.Drawing.Size, System.Drawing">
<value>39, 13</value>
</data>
<data name="label33.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="label33.Text" xml:space="preserve">
<value>X Axis:</value>
</data>
<data name="&gt;&gt;label33.Name" xml:space="preserve">
<value>label33</value>
</data>
<data name="&gt;&gt;label33.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label33.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;label33.ZOrder" xml:space="preserve">
<value>13</value>
</data>
<data name="gyroMousestickXAxisCom.Items" xml:space="preserve">
<value>Yaw</value>
</data>
<data name="gyroMousestickXAxisCom.Items1" xml:space="preserve">
<value>Roll</value>
</data>
<data name="gyroMousestickXAxisCom.Location" type="System.Drawing.Point, System.Drawing">
<value>191, 107</value>
</data>
<data name="gyroMousestickXAxisCom.Size" type="System.Drawing.Size, System.Drawing">
<value>56, 21</value>
</data>
<data name="gyroMousestickXAxisCom.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="&gt;&gt;gyroMousestickXAxisCom.Name" xml:space="preserve">
<value>gyroMousestickXAxisCom</value>
</data>
<data name="&gt;&gt;gyroMousestickXAxisCom.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gyroMousestickXAxisCom.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;gyroMousestickXAxisCom.ZOrder" xml:space="preserve">
<value>14</value>
</data>
<data name="gyroMouseStickInvertXCk.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="gyroMouseStickInvertXCk.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 134</value>
</data>
<data name="gyroMouseStickInvertXCk.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
<value>Yes</value>
</data>
<data name="gyroMouseStickInvertXCk.Size" type="System.Drawing.Size, System.Drawing">
<value>63, 17</value>
</data>
<data name="gyroMouseStickInvertXCk.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="gyroMouseStickInvertXCk.Text" xml:space="preserve">
<value>Invert X</value>
</data>
<data name="&gt;&gt;gyroMouseStickInvertXCk.Name" xml:space="preserve">
<value>gyroMouseStickInvertXCk</value>
</data>
<data name="&gt;&gt;gyroMouseStickInvertXCk.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gyroMouseStickInvertXCk.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;gyroMouseStickInvertXCk.ZOrder" xml:space="preserve">
<value>15</value>
</data>
<data name="gyroMouseStickInvertYCk.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="gyroMouseStickInvertYCk.Location" type="System.Drawing.Point, System.Drawing">
<value>72, 134</value>
</data>
<data name="gyroMouseStickInvertYCk.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
<value>Yes</value>
</data>
<data name="gyroMouseStickInvertYCk.Size" type="System.Drawing.Size, System.Drawing">
<value>63, 17</value>
</data>
<data name="gyroMouseStickInvertYCk.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="gyroMouseStickInvertYCk.Text" xml:space="preserve">
<value>Invert Y</value>
</data>
<data name="&gt;&gt;gyroMouseStickInvertYCk.Name" xml:space="preserve">
<value>gyroMouseStickInvertYCk</value>
</data>
<data name="&gt;&gt;gyroMouseStickInvertYCk.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gyroMouseStickInvertYCk.Parent" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;gyroMouseStickInvertYCk.ZOrder" xml:space="preserve">
<value>16</value>
</data>
<data name="gyroMouseJoyFLP.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 47</value>
</data>
<data name="gyroMouseJoyFLP.Size" type="System.Drawing.Size, System.Drawing">
<value>252, 181</value>
</data>
<data name="gyroMouseJoyFLP.TabIndex" type="System.Int32, mscorlib">
<value>260</value>
</data>
<data name="&gt;&gt;gyroMouseJoyFLP.Name" xml:space="preserve">
<value>gyroMouseJoyFLP</value>
</data>
<data name="&gt;&gt;gyroMouseJoyFLP.Type" xml:space="preserve">
<value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gyroMouseJoyFLP.Parent" xml:space="preserve">
<value>gBGyro</value>
</data>
<data name="&gt;&gt;gyroMouseJoyFLP.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="tPControls.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -8169,72 +8646,63 @@
<data name="fLPSettings.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="rBSAControls.AutoSize" type="System.Boolean, mscorlib">
<data name="label34.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="rBSAControls.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
<data name="label34.Location" type="System.Drawing.Point, System.Drawing">
<value>25, 17</value>
</data>
<data name="rBSAControls.Location" type="System.Drawing.Point, System.Drawing">
<value>144, 20</value>
<data name="label34.Size" type="System.Drawing.Size, System.Drawing">
<value>72, 13</value>
</data>
<data name="rBSAControls.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
<data name="label34.TabIndex" type="System.Int32, mscorlib">
<value>261</value>
</data>
<data name="rBSAControls.Size" type="System.Drawing.Size, System.Drawing">
<value>100, 17</value>
<data name="label34.Text" xml:space="preserve">
<value>Output Mode:</value>
</data>
<data name="rBSAControls.TabIndex" type="System.Int32, mscorlib">
<value>258</value>
<data name="&gt;&gt;label34.Name" xml:space="preserve">
<value>label34</value>
</data>
<data name="rBSAControls.Text" xml:space="preserve">
<value>Use for Controls</value>
<data name="&gt;&gt;label34.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rBSAControls.Name" xml:space="preserve">
<value>rBSAControls</value>
</data>
<data name="&gt;&gt;rBSAControls.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rBSAControls.Parent" xml:space="preserve">
<data name="&gt;&gt;label34.Parent" xml:space="preserve">
<value>gBGyro</value>
</data>
<data name="&gt;&gt;rBSAControls.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="rBSAMouse.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="rBSAMouse.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="rBSAMouse.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 20</value>
</data>
<data name="rBSAMouse.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="rBSAMouse.Size" type="System.Drawing.Size, System.Drawing">
<value>93, 17</value>
</data>
<data name="rBSAMouse.TabIndex" type="System.Int32, mscorlib">
<value>257</value>
</data>
<data name="rBSAMouse.Text" xml:space="preserve">
<value>Use as Mouse</value>
</data>
<data name="&gt;&gt;rBSAMouse.Name" xml:space="preserve">
<value>rBSAMouse</value>
</data>
<data name="&gt;&gt;rBSAMouse.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;rBSAMouse.Parent" xml:space="preserve">
<value>gBGyro</value>
</data>
<data name="&gt;&gt;rBSAMouse.ZOrder" xml:space="preserve">
<data name="&gt;&gt;label34.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="gyroOutputMode.Items" xml:space="preserve">
<value>Controls</value>
</data>
<data name="gyroOutputMode.Items1" xml:space="preserve">
<value>Mouse</value>
</data>
<data name="gyroOutputMode.Items2" xml:space="preserve">
<value>Mouse Joystick</value>
</data>
<data name="gyroOutputMode.Location" type="System.Drawing.Point, System.Drawing">
<value>122, 15</value>
</data>
<data name="gyroOutputMode.Size" type="System.Drawing.Size, System.Drawing">
<value>121, 21</value>
</data>
<data name="gyroOutputMode.TabIndex" type="System.Int32, mscorlib">
<value>260</value>
</data>
<data name="&gt;&gt;gyroOutputMode.Name" xml:space="preserve">
<value>gyroOutputMode</value>
</data>
<data name="&gt;&gt;gyroOutputMode.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gyroOutputMode.Parent" xml:space="preserve">
<value>gBGyro</value>
</data>
<data name="&gt;&gt;gyroOutputMode.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="toggleGyroMCb.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -8872,13 +9340,13 @@
<value>21</value>
</data>
<data name="pnlSAMouse.Location" type="System.Drawing.Point, System.Drawing">
<value>6, 39</value>
<value>4, 47</value>
</data>
<data name="pnlSAMouse.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>2, 2, 2, 2</value>
</data>
<data name="pnlSAMouse.Size" type="System.Drawing.Size, System.Drawing">
<value>263, 207</value>
<value>263, 222</value>
</data>
<data name="pnlSAMouse.TabIndex" type="System.Int32, mscorlib">
<value>259</value>
@ -8893,13 +9361,13 @@
<value>gBGyro</value>
</data>
<data name="&gt;&gt;pnlSAMouse.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="gBGyro.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 242</value>
</data>
<data name="gBGyro.Size" type="System.Drawing.Size, System.Drawing">
<value>272, 257</value>
<value>272, 256</value>
</data>
<data name="gBGyro.TabIndex" type="System.Int32, mscorlib">
<value>248</value>
@ -9556,7 +10024,7 @@
<value>True</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>47</value>
<value>114</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>96, 96</value>