From a8a55b46dc45050cb13bb38b4b0428dbe172a530 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 13 Jan 2019 13:32:38 -0600 Subject: [PATCH 01/54] Start using 128 as proper axis midpoint. Changed some mapping routines. Helps with mouse cursor in Civ 4 --- DS4Windows/DS4Control/Mapping.cs | 256 +++++++++++++++--------------- DS4Windows/DS4Control/Mouse.cs | 4 +- DS4Windows/DS4Library/DS4State.cs | 18 +-- 3 files changed, 141 insertions(+), 137 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 55e7c45..b151233 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -515,26 +515,26 @@ namespace DS4Windows int lsMaxZone = getLSMaxzone(device); if (lsDeadzone > 0 || lsAntiDead > 0 || lsMaxZone != 100) { - double lsSquared = Math.Pow(cState.LX - 127.5f, 2) + Math.Pow(cState.LY - 127.5f, 2); + double lsSquared = Math.Pow(cState.LX - 128f, 2) + Math.Pow(cState.LY - 128f, 2); double lsDeadzoneSquared = Math.Pow(lsDeadzone, 2); if (lsDeadzone > 0 && lsSquared <= lsDeadzoneSquared) { - dState.LX = 127; - dState.LY = 127; + dState.LX = 128; + dState.LY = 128; } else if ((lsDeadzone > 0 && lsSquared > lsDeadzoneSquared) || lsAntiDead > 0 || lsMaxZone != 100) { - double r = Math.Atan2(-(dState.LY - 127.5), (dState.LX - 127.5)); - double maxXValue = dState.LX >= 127.5 ? 127.5 : -127.5; - double maxYValue = dState.LY >= 127.5 ? 127.5 : -127.5; + double r = Math.Atan2(-(dState.LY - 128.0), (dState.LX - 128.0)); + double maxXValue = dState.LX >= 128.0 ? 127.0 : -128; + double maxYValue = dState.LY >= 128.0 ? 127.0 : -128; double ratio = lsMaxZone / 100.0; - double maxZoneXNegValue = (ratio * -127.5) + 127.5; - double maxZoneXPosValue = (ratio * 127.5) + 127.5; + double maxZoneXNegValue = (ratio * -128) + 128; + double maxZoneXPosValue = (ratio * 127) + 128; double maxZoneYNegValue = maxZoneXNegValue; double maxZoneYPosValue = maxZoneXPosValue; - double maxZoneX = dState.LX >= 127.5 ? (maxZoneXPosValue - 127.5) : (maxZoneXNegValue - 127.5); - double maxZoneY = dState.LY >= 127.5 ? (maxZoneYPosValue - 127.5) : (maxZoneYNegValue - 127.5); + double maxZoneX = dState.LX >= 128.0 ? (maxZoneXPosValue - 128.0) : (maxZoneXNegValue - 128.0); + double maxZoneY = dState.LY >= 128.0 ? (maxZoneYPosValue - 128.0) : (maxZoneYNegValue - 128.0); double tempLsXDead = 0.0, tempLsYDead = 0.0; double tempOutputX = 0.0, tempOutputY = 0.0; @@ -547,16 +547,16 @@ namespace DS4Windows { double currentX = Global.Clamp(maxZoneXNegValue, dState.LX, maxZoneXPosValue); double currentY = Global.Clamp(maxZoneYNegValue, dState.LY, maxZoneYPosValue); - tempOutputX = ((currentX - 127.5 - tempLsXDead) / (maxZoneX - tempLsXDead)); - tempOutputY = ((currentY - 127.5 - tempLsYDead) / (maxZoneY - tempLsYDead)); + tempOutputX = ((currentX - 128.0 - tempLsXDead) / (maxZoneX - tempLsXDead)); + tempOutputY = ((currentY - 128.0 - tempLsYDead) / (maxZoneY - tempLsYDead)); } } else { double currentX = Global.Clamp(maxZoneXNegValue, dState.LX, maxZoneXPosValue); double currentY = Global.Clamp(maxZoneYNegValue, dState.LY, maxZoneYPosValue); - tempOutputX = (currentX - 127.5) / maxZoneX; - tempOutputY = (currentY - 127.5) / maxZoneY; + tempOutputX = (currentX - 128.0) / maxZoneX; + tempOutputY = (currentY - 128.0) / maxZoneY; } double tempLsXAntiDeadPercent = 0.0, tempLsYAntiDeadPercent = 0.0; @@ -568,20 +568,20 @@ namespace DS4Windows if (tempOutputX > 0.0) { - dState.LX = (byte)((((1.0 - tempLsXAntiDeadPercent) * tempOutputX + tempLsXAntiDeadPercent)) * maxXValue + 127.5); + dState.LX = (byte)((((1.0 - tempLsXAntiDeadPercent) * tempOutputX + tempLsXAntiDeadPercent)) * maxXValue + 128.0); } else { - dState.LX = 127; + dState.LX = 128; } if (tempOutputY > 0.0) { - dState.LY = (byte)((((1.0 - tempLsYAntiDeadPercent) * tempOutputY + tempLsYAntiDeadPercent)) * maxYValue + 127.5); + dState.LY = (byte)((((1.0 - tempLsYAntiDeadPercent) * tempOutputY + tempLsYAntiDeadPercent)) * maxYValue + 128.0); } else { - dState.LY = 127; + dState.LY = 128; } } } @@ -591,26 +591,26 @@ namespace DS4Windows int rsMaxZone = getRSMaxzone(device); if (rsDeadzone > 0 || rsAntiDead > 0 || rsMaxZone != 100) { - double rsSquared = Math.Pow(cState.RX - 127.5, 2) + Math.Pow(cState.RY - 127.5, 2); + double rsSquared = Math.Pow(cState.RX - 128.0, 2) + Math.Pow(cState.RY - 128.0, 2); double rsDeadzoneSquared = Math.Pow(rsDeadzone, 2); if (rsDeadzone > 0 && rsSquared <= rsDeadzoneSquared) { - dState.RX = 127; - dState.RY = 127; + dState.RX = 128; + dState.RY = 128; } else if ((rsDeadzone > 0 && rsSquared > rsDeadzoneSquared) || rsAntiDead > 0 || rsMaxZone != 100) { - double r = Math.Atan2(-(dState.RY - 127.5), (dState.RX - 127.5)); - double maxXValue = dState.RX >= 127.5 ? 127.5 : -127.5; - double maxYValue = dState.RY >= 127.5 ? 127.5 : -127.5; + double r = Math.Atan2(-(dState.RY - 128.0), (dState.RX - 128.0)); + double maxXValue = dState.RX >= 128.0 ? 127 : -128; + double maxYValue = dState.RY >= 128.0 ? 127 : -128; double ratio = rsMaxZone / 100.0; - double maxZoneXNegValue = (ratio * -127.5) + 127.5; - double maxZoneXPosValue = (ratio * 127.5) + 127.5; + double maxZoneXNegValue = (ratio * -128.0) + 128.0; + double maxZoneXPosValue = (ratio * 127.0) + 128.0; double maxZoneYNegValue = maxZoneXNegValue; double maxZoneYPosValue = maxZoneXPosValue; - double maxZoneX = dState.RX >= 127.5 ? (maxZoneXPosValue - 127.5) : (maxZoneXNegValue - 127.5); - double maxZoneY = dState.RY >= 127.5 ? (maxZoneYPosValue - 127.5) : (maxZoneYNegValue - 127.5); + double maxZoneX = dState.RX >= 128.0 ? (maxZoneXPosValue - 128.0) : (maxZoneXNegValue - 128.0); + double maxZoneY = dState.RY >= 128.0 ? (maxZoneYPosValue - 128.0) : (maxZoneYNegValue - 128.0); double tempRsXDead = 0.0, tempRsYDead = 0.0; double tempOutputX = 0.0, tempOutputY = 0.0; @@ -624,8 +624,8 @@ namespace DS4Windows double currentX = Global.Clamp(maxZoneXNegValue, dState.RX, maxZoneXPosValue); double currentY = Global.Clamp(maxZoneYNegValue, dState.RY, maxZoneYPosValue); - tempOutputX = ((currentX - 127.5 - tempRsXDead) / (maxZoneX - tempRsXDead)); - tempOutputY = ((currentY - 127.5 - tempRsYDead) / (maxZoneY - tempRsYDead)); + tempOutputX = ((currentX - 128.0 - tempRsXDead) / (maxZoneX - tempRsXDead)); + tempOutputY = ((currentY - 128.0 - tempRsYDead) / (maxZoneY - tempRsYDead)); } } else @@ -633,8 +633,8 @@ namespace DS4Windows double currentX = Global.Clamp(maxZoneXNegValue, dState.RX, maxZoneXPosValue); double currentY = Global.Clamp(maxZoneYNegValue, dState.RY, maxZoneYPosValue); - tempOutputX = (currentX - 127.5) / maxZoneX; - tempOutputY = (currentY - 127.5) / maxZoneY; + tempOutputX = (currentX - 128.0) / maxZoneX; + tempOutputY = (currentY - 128.0) / maxZoneY; } double tempRsXAntiDeadPercent = 0.0, tempRsYAntiDeadPercent = 0.0; @@ -646,20 +646,20 @@ namespace DS4Windows if (tempOutputX > 0.0) { - dState.RX = (byte)((((1.0 - tempRsXAntiDeadPercent) * tempOutputX + tempRsXAntiDeadPercent)) * maxXValue + 127.5); + dState.RX = (byte)((((1.0 - tempRsXAntiDeadPercent) * tempOutputX + tempRsXAntiDeadPercent)) * maxXValue + 128.0); } else { - dState.RX = 127; + dState.RX = 128; } if (tempOutputY > 0.0) { - dState.RY = (byte)((((1.0 - tempRsYAntiDeadPercent) * tempOutputY + tempRsYAntiDeadPercent)) * maxYValue + 127.5); + dState.RY = (byte)((((1.0 - tempRsYAntiDeadPercent) * tempOutputY + tempRsYAntiDeadPercent)) * maxYValue + 128.0); } else { - dState.RY = 127; + dState.RY = 128; } } } @@ -743,15 +743,15 @@ namespace DS4Windows double lsSens = getLSSens(device); if (lsSens != 1.0) { - dState.LX = (byte)Global.Clamp(0, lsSens * (dState.LX - 127.5) + 127.5, 255); - dState.LY = (byte)Global.Clamp(0, lsSens * (dState.LY - 127.5) + 127.5, 255); + dState.LX = (byte)Global.Clamp(0, lsSens * (dState.LX - 128.0) + 127.0, 255); + dState.LY = (byte)Global.Clamp(0, lsSens * (dState.LY - 128.0) + 127.0, 255); } double rsSens = getRSSens(device); if (rsSens != 1.0) { - dState.RX = (byte)Global.Clamp(0, rsSens * (dState.RX - 127.5) + 127.5, 255); - dState.RY = (byte)Global.Clamp(0, rsSens * (dState.RY - 127.5) + 127.5, 255); + dState.RX = (byte)Global.Clamp(0, rsSens * (dState.RX - 128.0) + 127.0, 255); + dState.RY = (byte)Global.Clamp(0, rsSens * (dState.RY - 128.0) + 127.0, 255); } double l2Sens = getL2Sens(device); @@ -765,8 +765,10 @@ namespace DS4Windows int lsOutCurveMode = lsOutCurveModeArray[device] = getLsOutCurveMode(device); if (lsOutCurveMode > 0) { - double tempX = (dState.LX - 127.5) / 127.5; - double tempY = (dState.LY - 127.5) / 127.5; + double capX = dState.LX >= 128 ? 127.0 : 128.0; + double capY = dState.LY >= 128 ? 127.0 : 128.0; + double tempX = (dState.LX - 128.0) / capX; + double tempY = (dState.LY - 128.0) / capY; double signX = tempX >= 0.0 ? 1.0 : -1.0; double signY = tempY >= 0.0 ? 1.0 : -1.0; @@ -803,30 +805,32 @@ namespace DS4Windows outputY = (absY * 1.7296) - 0.7296; } - dState.LX = (byte)(outputX * signX * 127.5 + 127.5); - dState.LY = (byte)(outputY * signY * 127.5 + 127.5); + dState.LX = (byte)(outputX * signX * capX + 128.0); + dState.LY = (byte)(outputY * signY * capY + 128.0); } else if (lsOutCurveMode == 2) { double outputX = tempX * tempX; double outputY = tempY * tempY; - dState.LX = (byte)(outputX * signX * 127.5 + 127.5); - dState.LY = (byte)(outputY * signY * 127.5 + 127.5); + dState.LX = (byte)(outputX * signX * capX + 128.0); + dState.LY = (byte)(outputY * signY * capY + 128.0); } else if (lsOutCurveMode == 3) { double outputX = tempX * tempX * tempX; double outputY = tempY * tempY * tempY; - dState.LX = (byte)(outputX * 127.5 + 127.5); - dState.LY = (byte)(outputY * 127.5 + 127.5); + dState.LX = (byte)(outputX * capX + 128.0); + dState.LY = (byte)(outputY * capY + 128.0); } } int rsOutCurveMode = rsOutCurveModeArray[device] = getRsOutCurveMode(device); if (rsOutCurveMode > 0) { - double tempX = (dState.RX - 127.5) / 127.5; - double tempY = (dState.RY - 127.5) / 127.5; + double capX = dState.RX >= 128 ? 127.0 : 128.0; + double capY = dState.RY >= 128 ? 127.0 : 128.0; + double tempX = (dState.RX - 128.0) / capX; + double tempY = (dState.RY - 128.0) / capY; double signX = tempX >= 0.0 ? 1.0 : -1.0; double signY = tempY >= 0.0 ? 1.0 : -1.0; @@ -863,22 +867,22 @@ namespace DS4Windows outputY = (absY * 1.7296) - 0.7296; } - dState.RX = (byte)(outputX * signX * 127.5 + 127.5); - dState.RY = (byte)(outputY * signY * 127.5 + 127.5); + dState.RX = (byte)(outputX * signX * capX + 128.0); + dState.RY = (byte)(outputY * signY * capY + 128.0); } else if (rsOutCurveMode == 2) { double outputX = tempX * tempX; double outputY = tempY * tempY; - dState.RX = (byte)(outputX * signX * 127.5 + 127.5); - dState.RY = (byte)(outputY * signY * 127.5 + 127.5); + dState.RX = (byte)(outputX * signX * capX + 128.0); + dState.RY = (byte)(outputY * signY * capY + 128.0); } else if (rsOutCurveMode == 3) { double outputX = tempX * tempX * tempX; double outputY = tempY * tempY * tempY; - dState.RX = (byte)(outputX * 127.5 + 127.5); - dState.RY = (byte)(outputY * 127.5 + 127.5); + dState.RX = (byte)(outputX * capX + 128.0); + dState.RY = (byte)(outputY * capY + 128.0); } } @@ -1113,10 +1117,10 @@ namespace DS4Windows Mouse tp, ControlService ctrl) { /* TODO: This method is slow sauce. Find ways to speed up action execution */ - MappedState.LX = 127; - MappedState.LY = 127; - MappedState.RX = 127; - MappedState.RY = 127; + MappedState.LX = 128; + MappedState.LY = 128; + MappedState.RX = 128; + MappedState.RY = 128; double tempMouseDeltaX = 0.0; double tempMouseDeltaY = 0.0; int mouseDeltaX = 0; @@ -2511,9 +2515,9 @@ namespace DS4Windows { case DS4Controls.LXNeg: { - if (cState.LX < 127 - deadzoneL) + if (cState.LX < 128 - deadzoneL) { - double diff = -(cState.LX - 127 - deadzoneL) / (double)(0 - 127 - deadzoneL); + double diff = -(cState.LX - 128 - deadzoneL) / (double)(0 - 128 - deadzoneL); //tempMouseOffsetX = Math.Abs(Math.Cos(cState.LSAngleRad)) * MOUSESTICKOFFSET; //tempMouseOffsetX = MOUSESTICKOFFSET; tempMouseOffsetX = cState.LXUnit * MOUSESTICKOFFSET; @@ -2526,9 +2530,9 @@ namespace DS4Windows } case DS4Controls.LXPos: { - if (cState.LX > 127 + deadzoneL) + if (cState.LX > 128 + deadzoneL) { - double diff = (cState.LX - 127 + deadzoneL) / (double)(255 - 127 + deadzoneL); + double diff = (cState.LX - 128 + deadzoneL) / (double)(255 - 128 + deadzoneL); tempMouseOffsetX = cState.LXUnit * MOUSESTICKOFFSET; //tempMouseOffsetX = Math.Abs(Math.Cos(cState.LSAngleRad)) * MOUSESTICKOFFSET; //tempMouseOffsetX = MOUSESTICKOFFSET; @@ -2541,9 +2545,9 @@ namespace DS4Windows } case DS4Controls.RXNeg: { - if (cState.RX < 127 - deadzoneR) + if (cState.RX < 128 - deadzoneR) { - double diff = -(cState.RX - 127 - deadzoneR) / (double)(0 - 127 - deadzoneR); + double diff = -(cState.RX - 128 - deadzoneR) / (double)(0 - 128 - deadzoneR); tempMouseOffsetX = cState.RXUnit * MOUSESTICKOFFSET; //tempMouseOffsetX = MOUSESTICKOFFSET; //tempMouseOffsetX = Math.Abs(Math.Cos(cState.RSAngleRad)) * MOUSESTICKOFFSET; @@ -2556,9 +2560,9 @@ namespace DS4Windows } case DS4Controls.RXPos: { - if (cState.RX > 127 + deadzoneR) + if (cState.RX > 128 + deadzoneR) { - double diff = (cState.RX - 127 + deadzoneR) / (double)(255 - 127 + deadzoneR); + double diff = (cState.RX - 128 + deadzoneR) / (double)(255 - 128 + deadzoneR); tempMouseOffsetX = cState.RXUnit * MOUSESTICKOFFSET; //tempMouseOffsetX = MOUSESTICKOFFSET; //tempMouseOffsetX = Math.Abs(Math.Cos(cState.RSAngleRad)) * MOUSESTICKOFFSET; @@ -2571,9 +2575,9 @@ namespace DS4Windows } case DS4Controls.LYNeg: { - if (cState.LY < 127 - deadzoneL) + if (cState.LY < 128 - deadzoneL) { - double diff = -(cState.LY - 127 - deadzoneL) / (double)(0 - 127 - deadzoneL); + double diff = -(cState.LY - 128 - deadzoneL) / (double)(0 - 128 - deadzoneL); tempMouseOffsetY = cState.LYUnit * MOUSESTICKOFFSET; //tempMouseOffsetY = MOUSESTICKOFFSET; //tempMouseOffsetY = Math.Abs(Math.Sin(cState.LSAngleRad)) * MOUSESTICKOFFSET; @@ -2586,9 +2590,9 @@ namespace DS4Windows } case DS4Controls.LYPos: { - if (cState.LY > 127 + deadzoneL) + if (cState.LY > 128 + deadzoneL) { - double diff = (cState.LY - 127 + deadzoneL) / (double)(255 - 127 + deadzoneL); + double diff = (cState.LY - 128 + deadzoneL) / (double)(255 - 128 + deadzoneL); tempMouseOffsetY = cState.LYUnit * MOUSESTICKOFFSET; //tempMouseOffsetY = MOUSESTICKOFFSET; //tempMouseOffsetY = Math.Abs(Math.Sin(cState.LSAngleRad)) * MOUSESTICKOFFSET; @@ -2601,9 +2605,9 @@ namespace DS4Windows } case DS4Controls.RYNeg: { - if (cState.RY < 127 - deadzoneR) + if (cState.RY < 128 - deadzoneR) { - double diff = -(cState.RY - 127 - deadzoneR) / (double)(0 - 127 - deadzoneR); + double diff = -(cState.RY - 128 - deadzoneR) / (double)(0 - 128 - deadzoneR); tempMouseOffsetY = cState.RYUnit * MOUSESTICKOFFSET; //tempMouseOffsetY = MOUSESTICKOFFSET; //tempMouseOffsetY = Math.Abs(Math.Sin(cState.RSAngleRad)) * MOUSESTICKOFFSET; @@ -2616,9 +2620,9 @@ namespace DS4Windows } case DS4Controls.RYPos: { - if (cState.RY > 127 + deadzoneR) + if (cState.RY > 128 + deadzoneR) { - double diff = (cState.RY - 127 + deadzoneR) / (double)(255 - 127 + deadzoneR); + double diff = (cState.RY - 128 + deadzoneR) / (double)(255 - 128 + deadzoneR); tempMouseOffsetY = cState.RYUnit * MOUSESTICKOFFSET; //tempMouseOffsetY = MOUSESTICKOFFSET; //tempMouseOffsetY = Math.Abs(Math.Sin(cState.RSAngleRad)) * MOUSESTICKOFFSET; @@ -2769,11 +2773,11 @@ namespace DS4Windows switch (control) { - case DS4Controls.LXNeg: result = (byte)(axisValue - 127.5f > 0 ? 0 : -(axisValue - 127.5f) * 2); break; - case DS4Controls.LYNeg: result = (byte)(axisValue - 127.5f > 0 ? 0 : -(axisValue - 127.5f) * 2); break; - case DS4Controls.RXNeg: result = (byte)(axisValue - 127.5f > 0 ? 0 : -(axisValue - 127.5f) * 2); break; - case DS4Controls.RYNeg: result = (byte)(axisValue - 127.5f > 0 ? 0 : -(axisValue - 127.5f) * 2); break; - default: result = (byte)(axisValue - 127.5f < 0 ? 0 : (axisValue - 127.5f) * 2); break; + case DS4Controls.LXNeg: result = (byte)(axisValue - 128.0f >= 0 ? 0 : -(axisValue - 128.0f) * 1.9921875f); break; + case DS4Controls.LYNeg: result = (byte)(axisValue - 128.0f >= 0 ? 0 : -(axisValue - 128.0f) * 1.9921875f); break; + case DS4Controls.RXNeg: result = (byte)(axisValue - 128.0f >= 0 ? 0 : -(axisValue - 128.0f) * 1.9921875f); break; + case DS4Controls.RYNeg: result = (byte)(axisValue - 128.0f >= 0 ? 0 : -(axisValue - 128.0f) * 1.9921875f); break; + default: result = (byte)(axisValue - 128.0f < 0 ? 0 : (axisValue - 128.0f) * 2.0078740157480315f); break; } } else if (controlType == DS4StateFieldMapping.ControlType.Trigger) @@ -2868,14 +2872,14 @@ namespace DS4Windows { switch (control) { - case DS4Controls.LXNeg: result = (byte)(cState.LX - 127.5f > 0 ? 0 : -(cState.LX - 127.5f) * 2); break; - case DS4Controls.LYNeg: result = (byte)(cState.LY - 127.5f > 0 ? 0 : -(cState.LY - 127.5f) * 2); break; - case DS4Controls.RXNeg: result = (byte)(cState.RX - 127.5f > 0 ? 0 : -(cState.RX - 127.5f) * 2); break; - case DS4Controls.RYNeg: result = (byte)(cState.RY - 127.5f > 0 ? 0 : -(cState.RY - 127.5f) * 2); break; - case DS4Controls.LXPos: result = (byte)(cState.LX - 127.5f < 0 ? 0 : (cState.LX - 127.5f) * 2); break; - case DS4Controls.LYPos: result = (byte)(cState.LY - 127.5f < 0 ? 0 : (cState.LY - 127.5f) * 2); break; - case DS4Controls.RXPos: result = (byte)(cState.RX - 127.5f < 0 ? 0 : (cState.RX - 127.5f) * 2); break; - case DS4Controls.RYPos: result = (byte)(cState.RY - 127.5f < 0 ? 0 : (cState.RY - 127.5f) * 2); break; + case DS4Controls.LXNeg: result = (byte)(cState.LX - 128.0f >= 0 ? 0 : -(cState.LX - 128.0f) * 1.9921875f); break; + case DS4Controls.LYNeg: result = (byte)(cState.LY - 128.0f >= 0 ? 0 : -(cState.LY - 128.0f) * 1.9921875f); break; + case DS4Controls.RXNeg: result = (byte)(cState.RX - 128.0f >= 0 ? 0 : -(cState.RX - 128.0f) * 1.9921875f); break; + case DS4Controls.RYNeg: result = (byte)(cState.RY - 128.0f >= 0 ? 0 : -(cState.RY - 128.0f) * 1.9921875f); break; + case DS4Controls.LXPos: result = (byte)(cState.LX - 128.0f < 0 ? 0 : (cState.LX - 128.0f) * 2.0078740157480315f); break; + case DS4Controls.LYPos: result = (byte)(cState.LY - 128.0f < 0 ? 0 : (cState.LY - 128.0f) * 2.0078740157480315f); break; + case DS4Controls.RXPos: result = (byte)(cState.RX - 128.0f < 0 ? 0 : (cState.RX - 128.0f) * 2.0078740157480315f); break; + case DS4Controls.RYPos: result = (byte)(cState.RY - 128.0f < 0 ? 0 : (cState.RY - 128.0f) * 2.0078740157480315f); break; default: break; } } @@ -2996,14 +3000,14 @@ namespace DS4Windows { switch (control) { - case DS4Controls.LXNeg: result = cState.LX < 127 - 55; break; - case DS4Controls.LYNeg: result = cState.LY < 127 - 55; break; - case DS4Controls.RXNeg: result = cState.RX < 127 - 55; break; - case DS4Controls.RYNeg: result = cState.RY < 127 - 55; break; - case DS4Controls.LXPos: result = cState.LX > 127 + 55; break; - case DS4Controls.LYPos: result = cState.LY > 127 + 55; break; - case DS4Controls.RXPos: result = cState.RX > 127 + 55; break; - case DS4Controls.RYPos: result = cState.RY > 127 + 55; break; + case DS4Controls.LXNeg: result = cState.LX < 128 - 55; break; + case DS4Controls.LYNeg: result = cState.LY < 128 - 55; break; + case DS4Controls.RXNeg: result = cState.RX < 128 - 55; break; + case DS4Controls.RYNeg: result = cState.RY < 128 - 55; break; + case DS4Controls.LXPos: result = cState.LX > 128 + 55; break; + case DS4Controls.LYPos: result = cState.LY > 128 + 55; break; + case DS4Controls.RXPos: result = cState.RX > 128 + 55; break; + case DS4Controls.RYPos: result = cState.RY > 128 + 55; break; default: break; } } @@ -3130,49 +3134,49 @@ namespace DS4Windows case DS4Controls.LXNeg: { double angle = cState.LSAngle; - result = cState.LX < 127 && (angle >= 112.5 && angle <= 247.5); + result = cState.LX < 128 && (angle >= 112.5 && angle <= 247.5); break; } case DS4Controls.LYNeg: { double angle = cState.LSAngle; - result = cState.LY < 127 && (angle >= 22.5 && angle <= 157.5); + result = cState.LY < 128 && (angle >= 22.5 && angle <= 157.5); break; } case DS4Controls.RXNeg: { double angle = cState.RSAngle; - result = cState.RX < 127 && (angle >= 112.5 && angle <= 247.5); + result = cState.RX < 128 && (angle >= 112.5 && angle <= 247.5); break; } case DS4Controls.RYNeg: { double angle = cState.RSAngle; - result = cState.RY < 127 && (angle >= 22.5 && angle <= 157.5); + result = cState.RY < 128 && (angle >= 22.5 && angle <= 157.5); break; } case DS4Controls.LXPos: { double angle = cState.LSAngle; - result = cState.LX > 127 && (angle <= 67.5 || angle >= 292.5); + result = cState.LX > 128 && (angle <= 67.5 || angle >= 292.5); break; } case DS4Controls.LYPos: { double angle = cState.LSAngle; - result = cState.LY > 127 && (angle >= 202.5 && angle <= 337.5); + result = cState.LY > 128 && (angle >= 202.5 && angle <= 337.5); break; } case DS4Controls.RXPos: { double angle = cState.RSAngle; - result = cState.RX > 127 && (angle <= 67.5 || angle >= 292.5); + result = cState.RX > 128 && (angle <= 67.5 || angle >= 292.5); break; } case DS4Controls.RYPos: { double angle = cState.RSAngle; - result = cState.RY > 127 && (angle >= 202.5 && angle <= 337.5); + result = cState.RY > 128 && (angle >= 202.5 && angle <= 337.5); break; } default: break; @@ -3260,11 +3264,11 @@ namespace DS4Windows if (!analog) { double angle = cState.LSAngle; - result = cState.LX < 127 && (angle >= 112.5 && angle <= 247.5); + result = cState.LX < 128 && (angle >= 112.5 && angle <= 247.5); } else { - result = cState.LX < 127; + result = cState.LX < 128; } break; @@ -3274,11 +3278,11 @@ namespace DS4Windows if (!analog) { double angle = cState.LSAngle; - result = cState.LY < 127 && (angle >= 22.5 && angle <= 157.5); + result = cState.LY < 128 && (angle >= 22.5 && angle <= 157.5); } else { - result = cState.LY < 127; + result = cState.LY < 128; } break; @@ -3288,11 +3292,11 @@ namespace DS4Windows if (!analog) { double angle = cState.RSAngle; - result = cState.RX < 127 && (angle >= 112.5 && angle <= 247.5); + result = cState.RX < 128 && (angle >= 112.5 && angle <= 247.5); } else { - result = cState.RX < 127; + result = cState.RX < 128; } break; @@ -3302,11 +3306,11 @@ namespace DS4Windows if (!analog) { double angle = cState.RSAngle; - result = cState.RY < 127 && (angle >= 22.5 && angle <= 157.5); + result = cState.RY < 128 && (angle >= 22.5 && angle <= 157.5); } else { - result = cState.RY < 127; + result = cState.RY < 128; } break; @@ -3316,11 +3320,11 @@ namespace DS4Windows if (!analog) { double angle = cState.LSAngle; - result = cState.LX > 127 && (angle <= 67.5 || angle >= 292.5); + result = cState.LX > 128 && (angle <= 67.5 || angle >= 292.5); } else { - result = cState.LX > 127; + result = cState.LX > 128; } break; @@ -3330,11 +3334,11 @@ namespace DS4Windows if (!analog) { double angle = cState.LSAngle; - result = cState.LY > 127 && (angle >= 202.5 && angle <= 337.5); + result = cState.LY > 128 && (angle >= 202.5 && angle <= 337.5); } else { - result = cState.LY > 127; + result = cState.LY > 128; } break; @@ -3344,11 +3348,11 @@ namespace DS4Windows if (!analog) { double angle = cState.RSAngle; - result = cState.RX > 127 && (angle <= 67.5 || angle >= 292.5); + result = cState.RX > 128 && (angle <= 67.5 || angle >= 292.5); } else { - result = cState.RX > 127; + result = cState.RX > 128; } break; @@ -3358,11 +3362,11 @@ namespace DS4Windows if (!analog) { double angle = cState.RSAngle; - result = cState.RY > 127 && (angle >= 202.5 && angle <= 337.5); + result = cState.RY > 128 && (angle >= 202.5 && angle <= 337.5); } else { - result = cState.RY > 127; + result = cState.RY > 128; } break; @@ -3426,7 +3430,7 @@ namespace DS4Windows public static bool getBoolAxisDirMapping(byte stateAxis, bool positive) { - return positive ? stateAxis > 127 + 55 : stateAxis < 127 - 55; + return positive ? stateAxis > 128 + 55 : stateAxis < 128 - 55; } public static bool getBoolTriggerMapping(byte stateAxis) @@ -3473,11 +3477,11 @@ namespace DS4Windows { if (alt) { - result = (byte)(127.5f + fieldMap.triggers[controlNum] / 2f); + result = (byte)(128.0f + fieldMap.triggers[controlNum] / 2.0078740157480315f); } else { - result = (byte)(127.5f - fieldMap.triggers[controlNum] / 2f); + result = (byte)(128.0f - fieldMap.triggers[controlNum] / 2.0078740157480315f); } } else if (controlType == DS4StateFieldMapping.ControlType.Touch) @@ -3569,10 +3573,10 @@ namespace DS4Windows switch (control) { case DS4Controls.L1: result = (byte)(cState.L1 ? trueVal : falseVal); break; - case DS4Controls.L2: if (alt) result = (byte)(127.5f + cState.L2 / 2f); else result = (byte)(127.5f - cState.L2 / 2f); break; + case DS4Controls.L2: if (alt) result = (byte)(128.0f + cState.L2 / 2.0078740157480315f); else result = (byte)(128.0f - cState.L2 / 2.0078740157480315f); break; case DS4Controls.L3: result = (byte)(cState.L3 ? trueVal : falseVal); break; case DS4Controls.R1: result = (byte)(cState.R1 ? trueVal : falseVal); break; - case DS4Controls.R2: if (alt) result = (byte)(127.5f + cState.R2 / 2f); else result = (byte)(127.5f - cState.R2 / 2f); break; + case DS4Controls.R2: if (alt) result = (byte)(128.0f + cState.R2 / 2.0078740157480315f); else result = (byte)(128.0f - cState.R2 / 2.0078740157480315f); break; case DS4Controls.R3: result = (byte)(cState.R3 ? trueVal : falseVal); break; default: break; } diff --git a/DS4Windows/DS4Control/Mouse.cs b/DS4Windows/DS4Control/Mouse.cs index 23d2057..701021c 100644 --- a/DS4Windows/DS4Control/Mouse.cs +++ b/DS4Windows/DS4Control/Mouse.cs @@ -109,9 +109,9 @@ namespace DS4Windows case 2: return s.Square; case 3: return s.Triangle; case 4: return s.L1; - case 5: return s.L2 > 127; + case 5: return s.L2 > 128; case 6: return s.R1; - case 7: return s.R2 > 127; + case 7: return s.R2 > 128; case 8: return s.DpadUp; case 9: return s.DpadDown; case 10: return s.DpadLeft; diff --git a/DS4Windows/DS4Library/DS4State.cs b/DS4Windows/DS4Library/DS4State.cs index 7400f15..f3864c5 100644 --- a/DS4Windows/DS4Library/DS4State.cs +++ b/DS4Windows/DS4Library/DS4State.cs @@ -48,7 +48,7 @@ namespace DS4Windows L1 = L2Btn = L3 = R1 = R2Btn = R3 = false; Share = Options = PS = Touch1 = Touch2 = TouchButton = TouchRight = TouchLeft = false; Touch1Finger = Touch2Fingers = false; - LX = RX = LY = RY = 127; + LX = RX = LY = RY = 128; L2 = R2 = 0; FrameCounter = 255; // only actually has 6 bits, so this is a null indicator TouchPacketCounter = 255; // 8 bits, no great junk value @@ -183,14 +183,14 @@ namespace DS4Windows public void calculateStickAngles() { - double lsangle = Math.Atan2(-(LY - 127), (LX - 127)); + double lsangle = Math.Atan2(-(LY - 128), (LX - 128)); LSAngleRad = lsangle; lsangle = (lsangle >= 0 ? lsangle : (2 * Math.PI + lsangle)) * 180 / Math.PI; LSAngle = lsangle; LXUnit = Math.Abs(Math.Cos(LSAngleRad)); LYUnit = Math.Abs(Math.Sin(LSAngleRad)); - double rsangle = Math.Atan2(-(RY - 127), (RX - 127)); + double rsangle = Math.Atan2(-(RY - 128), (RX - 128)); RSAngleRad = rsangle; rsangle = (rsangle >= 0 ? rsangle : (2 * Math.PI + rsangle)) * 180 / Math.PI; RSAngle = rsangle; @@ -201,17 +201,17 @@ namespace DS4Windows public void rotateLSCoordinates(double rotation) { double sinAngle = Math.Sin(rotation), cosAngle = Math.Cos(rotation); - double tempLX = LX - 127.5, tempLY = LY - 127.5; - LX = (Byte)(Global.Clamp(-127.5, (tempLX * cosAngle - tempLY * sinAngle), 127.5) + 127.5); - LY = (Byte)(Global.Clamp(-127.5, (tempLX * sinAngle + tempLY * cosAngle), 127.5) + 127.5); + double tempLX = LX - 128.0, tempLY = LY - 128.0; + LX = (Byte)(Global.Clamp(-128.0, (tempLX * cosAngle - tempLY * sinAngle), 127.0) + 128.0); + LY = (Byte)(Global.Clamp(-128.0, (tempLX * sinAngle + tempLY * cosAngle), 127.0) + 128.0); } public void rotateRSCoordinates(double rotation) { double sinAngle = Math.Sin(rotation), cosAngle = Math.Cos(rotation); - double tempRX = RX - 127.5, tempRY = RY - 127.5; - RX = (Byte)(Global.Clamp(-127.5, (tempRX * cosAngle - tempRY * sinAngle), 127.5) + 127.5); - RY = (Byte)(Global.Clamp(-127.5, (tempRX * sinAngle + tempRY * cosAngle), 127.5) + 127.5); + double tempRX = RX - 128.0, tempRY = RY - 128.0; + RX = (Byte)(Global.Clamp(-128.0, (tempRX * cosAngle - tempRY * sinAngle), 127.0) + 128.0); + RY = (Byte)(Global.Clamp(-128.0, (tempRX * sinAngle + tempRY * cosAngle), 127.0) + 128.0); } } } From 5ec6bcb11a052d684d54ab0eac7f58634d7da955 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 13 Jan 2019 15:06:26 -0600 Subject: [PATCH 02/54] Increased mouse stick offset value Increasing it seems viable now --- DS4Windows/DS4Control/Mapping.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index b151233..209917e 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -166,7 +166,7 @@ namespace DS4Windows public static int prevmouseaccel = 0; private static double horizontalRemainder = 0.0, verticalRemainder = 0.0; private const int MOUSESPEEDFACTOR = 48; - private const double MOUSESTICKOFFSET = 0.049; + private const double MOUSESTICKOFFSET = 0.0495; public static void Commit(int device) { From df1ec44f1ca7f97d58421cdeecea3b64cc265def Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 16 Jan 2019 04:08:51 -0600 Subject: [PATCH 03/54] Fixed volume updating when sending timeout output reports --- DS4Windows/DS4Library/DS4Device.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index c306481..952bf53 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -1117,6 +1117,7 @@ namespace DS4Windows lock (outReportBuffer) { bool output = outputPendCount > 0, change = force; + bool haptime = output || standbySw.ElapsedMilliseconds >= 4000L; if (usingBT) { @@ -1137,6 +1138,8 @@ namespace DS4Windows for (int i = 0, arlen = BT_OUTPUT_CHANGE_LENGTH; !change && i < arlen; i++) change = byteR[i] != byteB[i]; } + + haptime = haptime || change; } else { @@ -1157,7 +1160,8 @@ namespace DS4Windows change = byteR[i] != byteB[i]; } - if (change && audio != null) + haptime = haptime || change; + if (haptime && audio != null) { // Headphone volume levels outReportBuffer[19] = outReportBuffer[20] = @@ -1169,8 +1173,7 @@ namespace DS4Windows if (synchronous) { - output = output || standbySw.ElapsedMilliseconds >= 4000L; - if (output || change) + if (output || haptime) { if (change) { @@ -1218,8 +1221,7 @@ namespace DS4Windows //for (int i = 0, arlen = outputReport.Length; !change && i < arlen; i++) // change = outputReport[i] != outReportBuffer[i]; - output = output || standbySw.ElapsedMilliseconds >= 4000L; - if (output || change) + if (output || haptime) { if (change) { From ec71282ce31b975d30b9cc950be44dae34d550d7 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 16 Jan 2019 05:07:19 -0600 Subject: [PATCH 04/54] Changed DS4Color to use IEquatable interface Allows for faster Equals method than the previous implementation --- DS4Windows/DS4Library/DS4Device.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index 952bf53..9dd72ec 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -12,7 +12,7 @@ using DS4Windows.DS4Library; namespace DS4Windows { - public struct DS4Color + public struct DS4Color : IEquatable { public byte red; public byte green; @@ -31,15 +31,9 @@ namespace DS4Windows blue = b; } - public override bool Equals(object obj) + public bool Equals(DS4Color other) { - if (obj is DS4Color) - { - DS4Color dsc = ((DS4Color)obj); - return (this.red == dsc.red && this.green == dsc.green && this.blue == dsc.blue); - } - else - return false; + return this.red == other.red && this.green == other.green && this.blue == other.blue; } public Color ToColor => Color.FromArgb(red, green, blue); From 19c81b8f68e53d4dcdc0456bfdd81d0ec8d61c64 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 16 Jan 2019 14:12:28 -0600 Subject: [PATCH 05/54] Use base class type for main form ref --- DS4Windows/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/Program.cs b/DS4Windows/Program.cs index 06406da..82b7d4a 100644 --- a/DS4Windows/Program.cs +++ b/DS4Windows/Program.cs @@ -21,7 +21,7 @@ namespace DS4Windows public static ControlService rootHub; private static Thread testThread; private static Thread controlThread; - private static DS4Form ds4form; + private static Form ds4form; /// /// The main entry point for the application. From 190dc5e75c08ea88a48b96e7bcb33ae185740fc6 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 17 Jan 2019 03:26:19 -0600 Subject: [PATCH 06/54] Remove old call for low latency garbage collection --- DS4Windows/Program.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/DS4Windows/Program.cs b/DS4Windows/Program.cs index 82b7d4a..ca1d32e 100644 --- a/DS4Windows/Program.cs +++ b/DS4Windows/Program.cs @@ -5,7 +5,6 @@ using System.Runtime.InteropServices; using Process = System.Diagnostics.Process; using System.ComponentModel; using System.Globalization; -using System.Runtime; using Microsoft.Win32.TaskScheduler; namespace DS4Windows @@ -69,8 +68,6 @@ namespace DS4Windows } } - GCSettings.LatencyMode = GCLatencyMode.LowLatency; - try { Process.GetCurrentProcess().PriorityClass = From d79e368c6a2378d4031322b385b8a196a19a0067 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 18 Jan 2019 02:11:09 -0600 Subject: [PATCH 07/54] Updated newest version file --- DS4Windows/newest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/newest.txt b/DS4Windows/newest.txt index ec70f75..400084b 100644 --- a/DS4Windows/newest.txt +++ b/DS4Windows/newest.txt @@ -1 +1 @@ -1.6.6 +1.6.7 From 8f25e4b6305f9c1fed86d1936a7752ed8437c2b3 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 18 Jan 2019 02:11:22 -0600 Subject: [PATCH 08/54] Version 1.6.7 --- DS4Windows/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index 20c5e1b..3ddc1a6 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.6")] -[assembly: AssemblyFileVersion("1.6.6")] +[assembly: AssemblyVersion("1.6.7")] +[assembly: AssemblyFileVersion("1.6.7")] [assembly: NeutralResourcesLanguage("en")] From bf3f10d0aefa11b11a1e7bbf9083bc31b376dec3 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 18 Jan 2019 15:38:13 -0600 Subject: [PATCH 09/54] Apply proposed changes for HG v.1 support --- DS4Windows/DS4Control/ControlService.cs | 12 ++++++++++++ DS4Windows/DS4Control/ScpUtil.cs | 25 +++++++++++++++++++------ DS4Windows/DS4Forms/DS4Form.cs | 2 +- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs index 3bb0c16..3d9c79b 100644 --- a/DS4Windows/DS4Control/ControlService.cs +++ b/DS4Windows/DS4Control/ControlService.cs @@ -155,6 +155,18 @@ namespace DS4Windows // Thread.SpinWait(500); //} + if (Global.IsHidGuardianInstalled()) + { + ProcessStartInfo startInfo = + new ProcessStartInfo(Global.exepath + "\\HidGuardHelper.exe"); + startInfo.Verb = "runas"; + startInfo.Arguments = Process.GetCurrentProcess().Id.ToString(); + startInfo.WorkingDirectory = Global.exepath; + try + { Process tempProc = Process.Start(startInfo); tempProc.Dispose(); } + catch { } + } + for (int i = 0, arlength = DS4Controllers.Length; i < arlength; i++) { processingData[i] = new X360Data(); diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 6959f53..b56d4f7 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -227,7 +227,7 @@ namespace DS4Windows { protected static BackingStore m_Config = new BackingStore(); protected static Int32 m_IdleTimeout = 600000; - public static string exepath = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName; + public static readonly string exepath = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName; public static string appdatapath; public static bool firstRun = false; public static bool multisavespots = false; @@ -297,25 +297,28 @@ namespace DS4Windows return principal.IsInRole(WindowsBuiltInRole.Administrator); } - public static bool IsScpVBusInstalled() + private static bool CheckForSysDevice(string searchHardwareId) { bool result = false; Guid sysGuid = Guid.Parse("{4d36e97d-e325-11ce-bfc1-08002be10318}"); - NativeMethods.SP_DEVINFO_DATA deviceInfoData = new NativeMethods.SP_DEVINFO_DATA(); - deviceInfoData.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(deviceInfoData); + NativeMethods.SP_DEVINFO_DATA deviceInfoData = + new NativeMethods.SP_DEVINFO_DATA(); + deviceInfoData.cbSize = + System.Runtime.InteropServices.Marshal.SizeOf(deviceInfoData); var dataBuffer = new byte[4096]; ulong propertyType = 0; var requiredSize = 0; IntPtr deviceInfoSet = NativeMethods.SetupDiGetClassDevs(ref sysGuid, null, 0, 0); for (int i = 0; !result && NativeMethods.SetupDiEnumDeviceInfo(deviceInfoSet, i, ref deviceInfoData); i++) { - if (NativeMethods.SetupDiGetDeviceProperty(deviceInfoSet, ref deviceInfoData, ref NativeMethods.DEVPKEY_Device_HardwareIds, ref propertyType, + if (NativeMethods.SetupDiGetDeviceProperty(deviceInfoSet, ref deviceInfoData, + ref NativeMethods.DEVPKEY_Device_HardwareIds, ref propertyType, dataBuffer, dataBuffer.Length, ref requiredSize, 0)) { string hardwareId = dataBuffer.ToUTF16String(); //if (hardwareIds.Contains("Scp Virtual Bus Driver")) // result = true; - if (hardwareId.Equals(@"root\ScpVBus")) + if (hardwareId.Equals(searchHardwareId)) result = true; } } @@ -328,6 +331,16 @@ namespace DS4Windows return result; } + public static bool IsHidGuardianInstalled() + { + return CheckForSysDevice(@"Root\HidGuardian"); + } + + public static bool IsScpVBusInstalled() + { + return CheckForSysDevice(@"root\ScpVBus"); + } + public static void FindConfigLocation() { if (File.Exists(exepath + "\\Auto Profiles.xml") diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index b48dcbb..d89b20c 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -401,7 +401,7 @@ namespace DS4Windows if (btnStartStop.Enabled && start) { - TaskRunner.Delay(50).ContinueWith((t) => { + TaskRunner.Delay(100).ContinueWith((t) => { this.BeginInvoke((System.Action)(() => BtnStartStop_Clicked())); }); } From dc403100f1916384ec73650b8297277b9e79591c Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 22 Jan 2019 18:04:54 -0600 Subject: [PATCH 10/54] Changed another portion to use 128 as stick axis midpoint --- DS4Windows/DS4Control/Mapping.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 209917e..3632319 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1563,7 +1563,7 @@ namespace DS4Windows case DS4Controls.LXNeg: case DS4Controls.LXPos: { - if (MappedState.LX == 127) + if (MappedState.LX == 128) { if (dc == DS4Controls.LXNeg) { @@ -1582,7 +1582,7 @@ namespace DS4Windows case DS4Controls.LYNeg: case DS4Controls.LYPos: { - if (MappedState.LY == 127) + if (MappedState.LY == 128) { if (dc == DS4Controls.LYNeg) { @@ -1601,7 +1601,7 @@ namespace DS4Windows case DS4Controls.RXNeg: case DS4Controls.RXPos: { - if (MappedState.RX == 127) + if (MappedState.RX == 128) { if (dc == DS4Controls.RXNeg) { @@ -1620,7 +1620,7 @@ namespace DS4Windows case DS4Controls.RYNeg: case DS4Controls.RYPos: { - if (MappedState.RY == 127) + if (MappedState.RY == 128) { if (dc == DS4Controls.RYNeg) { From 1f9cf16397e16bbfb7703867b7d4f1bb0a553729 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 24 Jan 2019 03:38:21 -0600 Subject: [PATCH 11/54] Minor control search optimization --- DS4Windows/DS4Control/ScpUtil.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 6959f53..027f5ad 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -3543,16 +3543,18 @@ namespace DS4Windows else dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true); - List ds4settingsList = ds4settings[deviceNum]; - for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++) + int temp = (int)dc; + if (temp > 0) { - DS4ControlSettings dcs = ds4settingsList[i]; - if (dcs.control == dc) + int index = temp - 1; + DS4ControlSettings dcs = ds4settings[deviceNum][index]; + if (shift) { - if (shift) - return dcs.shiftAction; - else - return dcs.action; + return dcs.shiftTrigger; + } + else + { + return dcs.action; } } From 1a6327ecdc48a15dbc1f11c3a6a2ee6319ee0c40 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 24 Jan 2019 04:54:40 -0600 Subject: [PATCH 12/54] Tweaked a couple of axis midpoint methods. Removed unused method. --- DS4Windows/DS4Control/Mapping.cs | 85 ++++---------------------------- 1 file changed, 9 insertions(+), 76 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 3632319..d663640 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -3077,11 +3077,11 @@ namespace DS4Windows switch (control) { - case DS4Controls.LXNeg: result = cState.LX < 127 - 55; break; - case DS4Controls.LYNeg: result = cState.LY < 127 - 55; break; - case DS4Controls.RXNeg: result = cState.RX < 127 - 55; break; - case DS4Controls.RYNeg: result = cState.RY < 127 - 55; break; - default: result = axisValue > 127 + 55; break; + case DS4Controls.LXNeg: result = cState.LX < 128 - 55; break; + case DS4Controls.LYNeg: result = cState.LY < 128 - 55; break; + case DS4Controls.RXNeg: result = cState.RX < 128 - 55; break; + case DS4Controls.RYNeg: result = cState.RY < 128 - 55; break; + default: result = axisValue > 128 + 55; break; } } else if (controlType == DS4StateFieldMapping.ControlType.Trigger) @@ -3448,7 +3448,7 @@ namespace DS4Windows { byte result = 0; byte trueVal = 0; - byte falseVal = 127; + byte falseVal = 128; if (alt) trueVal = 255; @@ -3548,6 +3548,7 @@ namespace DS4Windows return result; } + /* TODO: Possibly remove usage of this version of the method */ public static byte getXYAxisMapping(int device, DS4Controls control, DS4State cState, DS4StateExposed eState, Mouse tp, bool alt = false) { byte result = 0; @@ -3690,74 +3691,6 @@ namespace DS4Windows return result; } - /* TODO: Possibly remove usage of this version of the method */ - //Returns false for any bool, - //if control is one of the xy axis returns 127 - //if its a trigger returns 0 - public static void resetToDefaultValue(DS4Controls control, DS4State cState) - { - if (control >= DS4Controls.Square && control <= DS4Controls.Cross) - { - switch (control) - { - case DS4Controls.Cross: cState.Cross = false; break; - case DS4Controls.Square: cState.Square = false; break; - case DS4Controls.Triangle: cState.Triangle = false; break; - case DS4Controls.Circle: cState.Circle = false; break; - default: break; - } - } - else if (control >= DS4Controls.L1 && control <= DS4Controls.R3) - { - switch (control) - { - case DS4Controls.L1: cState.L1 = false; break; - case DS4Controls.L2: cState.L2 = 0; break; - case DS4Controls.L3: cState.L3 = false; break; - case DS4Controls.R1: cState.R1 = false; break; - case DS4Controls.R2: cState.R2 = 0; break; - case DS4Controls.R3: cState.R3 = false; break; - default: break; - } - } - else if (control >= DS4Controls.DpadUp && control <= DS4Controls.DpadLeft) - { - switch (control) - { - case DS4Controls.DpadUp: cState.DpadUp = false; break; - case DS4Controls.DpadDown: cState.DpadDown = false; break; - case DS4Controls.DpadLeft: cState.DpadLeft = false; break; - case DS4Controls.DpadRight: cState.DpadRight = false; break; - default: break; - } - } - else if (control >= DS4Controls.LXNeg && control <= DS4Controls.RYPos) - { - switch (control) - { - case DS4Controls.LXNeg: cState.LX = 127; break; - case DS4Controls.LYNeg: cState.LY = 127; break; - case DS4Controls.RXNeg: cState.RX = 127; break; - case DS4Controls.RYNeg: cState.RY = 127; break; - case DS4Controls.LXPos: cState.LX = 127; break; - case DS4Controls.LYPos: cState.LY = 127; break; - case DS4Controls.RXPos: cState.RX = 127; break; - case DS4Controls.RYPos: cState.RY = 127; break; - default: break; - } - } - else - { - switch (control) - { - case DS4Controls.Share: cState.Share = false; break; - case DS4Controls.Options: cState.Options = false; break; - case DS4Controls.PS: cState.PS = false; break; - default: break; - } - } - } - private static void resetToDefaultValue2(DS4Controls control, DS4State cState, DS4StateFieldMapping fieldMap) { @@ -3769,9 +3702,9 @@ namespace DS4Windows } else if (controlType == DS4StateFieldMapping.ControlType.AxisDir) { - fieldMap.axisdirs[controlNum] = 127; + fieldMap.axisdirs[controlNum] = 128; int controlRelation = (controlNum % 2 == 0 ? controlNum - 1 : controlNum + 1); - fieldMap.axisdirs[controlRelation] = 127; + fieldMap.axisdirs[controlRelation] = 128; } else if (controlType == DS4StateFieldMapping.ControlType.Trigger) { From 0d89170d9cae1f872ab6d18dc9030b8d3c9c147c Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 24 Jan 2019 06:20:55 -0600 Subject: [PATCH 13/54] Minor tweaks --- DS4Windows/DS4Control/ScpUtil.cs | 109 +++++++++++++------------------ 1 file changed, 47 insertions(+), 62 deletions(-) diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 027f5ad..5aef3ed 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -3475,15 +3475,12 @@ namespace DS4Windows else dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true); - List ds4settingsList = ds4settings[deviceNum]; - for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++) + int temp = (int)dc; + if (temp > 0) { - DS4ControlSettings dcs = ds4settingsList[i]; - if (dcs.control == dc) - { - dcs.UpdateSettings(shift, action, exts, kt, trigger); - break; - } + int index = temp - 1; + DS4ControlSettings dcs = ds4settings[deviceNum][index]; + dcs.UpdateSettings(shift, action, exts, kt, trigger); } } @@ -3495,19 +3492,15 @@ namespace DS4Windows else dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true); - List ds4settingsList = ds4settings[deviceNum]; - for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++) + int temp = (int)dc; + if (temp > 0) { - DS4ControlSettings dcs = ds4settingsList[i]; - if (dcs.control == dc) - { - if (shift) - dcs.shiftExtras = exts; - else - dcs.extras = exts; - - break; - } + int index = temp - 1; + DS4ControlSettings dcs = ds4settings[deviceNum][index]; + if (shift) + dcs.shiftExtras = exts; + else + dcs.extras = exts; } } @@ -3519,19 +3512,15 @@ namespace DS4Windows else dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true); - List ds4settingsList = ds4settings[deviceNum]; - for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++) + int temp = (int)dc; + if (temp > 0) { - DS4ControlSettings dcs = ds4settingsList[i]; - if (dcs.control == dc) - { - if (shift) - dcs.shiftKeyType = keyType; - else - dcs.keyType = keyType; - - break; - } + int index = temp - 1; + DS4ControlSettings dcs = ds4settings[deviceNum][index]; + if (shift) + dcs.shiftKeyType = keyType; + else + dcs.keyType = keyType; } } @@ -3589,17 +3578,15 @@ namespace DS4Windows else dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true); - List ds4settingsList = ds4settings[deviceNum]; - for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++) + int temp = (int)dc; + if (temp > 0) { - DS4ControlSettings dcs = ds4settingsList[i]; - if (dcs.control == dc) - { - if (shift) - return dcs.shiftExtras; - else - return dcs.extras; - } + int index = temp - 1; + DS4ControlSettings dcs = ds4settings[deviceNum][index]; + if (shift) + return dcs.shiftExtras; + else + return dcs.extras; } return null; @@ -3613,17 +3600,15 @@ namespace DS4Windows else dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true); - List ds4settingsList = ds4settings[deviceNum]; - for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++) + int temp = (int)dc; + if (temp > 0) { - DS4ControlSettings dcs = ds4settingsList[i]; - if (dcs.control == dc) - { - if (shift) - return dcs.shiftKeyType; - else - return dcs.keyType; - } + int index = temp - 1; + DS4ControlSettings dcs = ds4settings[deviceNum][index]; + if (shift) + return dcs.shiftKeyType; + else + return dcs.keyType; } return DS4KeyType.None; @@ -3637,12 +3622,12 @@ namespace DS4Windows else dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true); - List ds4settingsList = ds4settings[deviceNum]; - for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++) + int temp = (int)dc; + if (temp > 0) { - DS4ControlSettings dcs = ds4settingsList[i]; - if (dcs.control == dc) - return dcs.shiftTrigger; + int index = temp - 1; + DS4ControlSettings dcs = ds4settings[deviceNum][index]; + return dcs.shiftTrigger; } return 0; @@ -3669,12 +3654,12 @@ namespace DS4Windows else dc = (DS4Controls)Enum.Parse(typeof(DS4Controls), buttonName, true); - List ds4settingsList = ds4settings[deviceNum]; - for (int i = 0, settingsLen = ds4settingsList.Count; i < settingsLen; i++) + int temp = (int)dc; + if (temp > 0) { - DS4ControlSettings dcs = ds4settingsList[i]; - if (dcs.control == dc) - return dcs; + int index = temp - 1; + DS4ControlSettings dcs = ds4settings[deviceNum][index]; + return dcs; } return null; From 385c3f9b76dfdb1d9042778bbc679e7025280655 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 25 Jan 2019 06:12:12 -0600 Subject: [PATCH 14/54] Implement FILE_ATTRIBUTE_TEMPORARY use when opening DS4 device --- DS4Windows/HidLibrary/HidDevice.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/HidLibrary/HidDevice.cs b/DS4Windows/HidLibrary/HidDevice.cs index 7af84f2..0d9c894 100644 --- a/DS4Windows/HidLibrary/HidDevice.cs +++ b/DS4Windows/HidLibrary/HidDevice.cs @@ -450,11 +450,11 @@ namespace DS4Windows if (isExclusive) { - hidHandle = NativeMethods.CreateFile(devicePathName, NativeMethods.GENERIC_READ | NativeMethods.GENERIC_WRITE, 0, IntPtr.Zero, NativeMethods.OpenExisting, 0x20000000 | 0x80000000 | NativeMethods.FILE_FLAG_OVERLAPPED, 0); + hidHandle = NativeMethods.CreateFile(devicePathName, NativeMethods.GENERIC_READ | NativeMethods.GENERIC_WRITE, 0, IntPtr.Zero, NativeMethods.OpenExisting, 0x20000000 | 0x80000000 | 0x100 | NativeMethods.FILE_FLAG_OVERLAPPED, 0); } else { - hidHandle = NativeMethods.CreateFile(devicePathName, NativeMethods.GENERIC_READ | NativeMethods.GENERIC_WRITE, NativeMethods.FILE_SHARE_READ | NativeMethods.FILE_SHARE_WRITE, IntPtr.Zero, NativeMethods.OpenExisting, 0x20000000 | 0x80000000 | NativeMethods.FILE_FLAG_OVERLAPPED, 0); + hidHandle = NativeMethods.CreateFile(devicePathName, NativeMethods.GENERIC_READ | NativeMethods.GENERIC_WRITE, NativeMethods.FILE_SHARE_READ | NativeMethods.FILE_SHARE_WRITE, IntPtr.Zero, NativeMethods.OpenExisting, 0x20000000 | 0x80000000 | 0x100 | NativeMethods.FILE_FLAG_OVERLAPPED, 0); } return hidHandle; From 25991b22c6e6a2f53317a881518fd05bf18af74f Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 26 Jan 2019 20:26:41 -0600 Subject: [PATCH 15/54] Update newest text file --- DS4Windows/newest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/newest.txt b/DS4Windows/newest.txt index 400084b..d8c5e72 100644 --- a/DS4Windows/newest.txt +++ b/DS4Windows/newest.txt @@ -1 +1 @@ -1.6.7 +1.6.8 From e0138bdebacdfc610d8bd3c945b88553c9a54483 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 26 Jan 2019 20:26:53 -0600 Subject: [PATCH 16/54] Version 1.6.8 --- DS4Windows/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index 3ddc1a6..1497a9d 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.7")] -[assembly: AssemblyFileVersion("1.6.7")] +[assembly: AssemblyVersion("1.6.8")] +[assembly: AssemblyFileVersion("1.6.8")] [assembly: NeutralResourcesLanguage("en")] From 63f7dcfdceb9c05c738e8f30d3a2ac9dc17cf0dd Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 29 Jan 2019 21:19:25 -0600 Subject: [PATCH 17/54] Added easeout quad curves for LS and RS --- DS4Windows/DS4Control/Mapping.cs | 18 +++++++++++ DS4Windows/DS4Control/ScpUtil.cs | 2 ++ DS4Windows/DS4Forms/Options.Designer.cs | 40 +++++++++++++------------ DS4Windows/DS4Forms/Options.resx | 11 ++++--- 4 files changed, 48 insertions(+), 23 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index d663640..5664715 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -822,6 +822,15 @@ namespace DS4Windows dState.LX = (byte)(outputX * capX + 128.0); dState.LY = (byte)(outputY * capY + 128.0); } + else if (lsOutCurveMode == 4) + { + double absX = Math.Abs(tempX); + double absY = Math.Abs(tempY); + double outputX = absX * (absX - 2.0); + double outputY = absY * (absY - 2.0); + dState.LX = (byte)(-1.0 * outputX * signX * capX + 128.0); + dState.LY = (byte)(-1.0 * outputY * signY * capY + 128.0); + } } int rsOutCurveMode = rsOutCurveModeArray[device] = getRsOutCurveMode(device); @@ -884,6 +893,15 @@ namespace DS4Windows dState.RX = (byte)(outputX * capX + 128.0); dState.RY = (byte)(outputY * capY + 128.0); } + else if (rsOutCurveMode == 4) + { + double absX = Math.Abs(tempX); + double absY = Math.Abs(tempY); + double outputX = absX * (absX - 2.0); + double outputY = absY * (absY - 2.0); + dState.RX = (byte)(-1.0 * outputX * signX * capX + 128.0); + dState.RY = (byte)(-1.0 * outputY * signY * capY + 128.0); + } } int l2OutCurveMode = tempIntArray[device] = getL2OutCurveMode(device); diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index bed1180..49a2906 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -1579,6 +1579,7 @@ namespace DS4Windows case 1: result = "enhanced-precision"; break; case 2: result = "quadratic"; break; case 3: result = "cubic"; break; + case 4: result = "easeout-quad"; break; default: break; } @@ -1594,6 +1595,7 @@ namespace DS4Windows case "enhanced-precision": id = 1; break; case "quadratic": id = 2; break; case "cubic": id = 3; break; + case "easeout-quad": id = 4; break; default: break; } diff --git a/DS4Windows/DS4Forms/Options.Designer.cs b/DS4Windows/DS4Forms/Options.Designer.cs index cd9742a..184e813 100644 --- a/DS4Windows/DS4Forms/Options.Designer.cs +++ b/DS4Windows/DS4Forms/Options.Designer.cs @@ -315,6 +315,8 @@ this.rBSAControls = new System.Windows.Forms.RadioButton(); this.rBSAMouse = new System.Windows.Forms.RadioButton(); this.pnlSAMouse = new System.Windows.Forms.Panel(); + this.label26 = new System.Windows.Forms.Label(); + this.triggerCondAndCombo = new System.Windows.Forms.ComboBox(); this.cBGyroMouseXAxis = new System.Windows.Forms.ComboBox(); this.label16 = new System.Windows.Forms.Label(); this.lbGyroSmooth = new System.Windows.Forms.Label(); @@ -386,8 +388,6 @@ this.optionsTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.shareTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.psTouchInvStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.triggerCondAndCombo = new System.Windows.Forms.ComboBox(); - this.label26 = new System.Windows.Forms.Label(); this.advColorDialog = new DS4Windows.AdvancedColorDialog(); ((System.ComponentModel.ISupportInitialize)(this.nUDRainbow)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tBBlueBar)).BeginInit(); @@ -3210,7 +3210,8 @@ resources.GetString("rsOutCurveComboBox.Items"), resources.GetString("rsOutCurveComboBox.Items1"), resources.GetString("rsOutCurveComboBox.Items2"), - resources.GetString("rsOutCurveComboBox.Items3")}); + resources.GetString("rsOutCurveComboBox.Items3"), + resources.GetString("rsOutCurveComboBox.Items4")}); resources.ApplyResources(this.rsOutCurveComboBox, "rsOutCurveComboBox"); this.rsOutCurveComboBox.Name = "rsOutCurveComboBox"; this.rsOutCurveComboBox.SelectedIndexChanged += new System.EventHandler(this.rsOutCurveComboBox_SelectedIndexChanged); @@ -3224,7 +3225,8 @@ resources.GetString("lsOutCurveComboBox.Items"), resources.GetString("lsOutCurveComboBox.Items1"), resources.GetString("lsOutCurveComboBox.Items2"), - resources.GetString("lsOutCurveComboBox.Items3")}); + resources.GetString("lsOutCurveComboBox.Items3"), + resources.GetString("lsOutCurveComboBox.Items4")}); resources.ApplyResources(this.lsOutCurveComboBox, "lsOutCurveComboBox"); this.lsOutCurveComboBox.Name = "lsOutCurveComboBox"; this.lsOutCurveComboBox.SelectedIndexChanged += new System.EventHandler(this.lsOutCurveComboBox_SelectedIndexChanged); @@ -3408,6 +3410,21 @@ resources.ApplyResources(this.pnlSAMouse, "pnlSAMouse"); this.pnlSAMouse.Name = "pnlSAMouse"; // + // label26 + // + resources.ApplyResources(this.label26, "label26"); + this.label26.Name = "label26"; + // + // triggerCondAndCombo + // + this.triggerCondAndCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.triggerCondAndCombo.FormattingEnabled = true; + this.triggerCondAndCombo.Items.AddRange(new object[] { + resources.GetString("triggerCondAndCombo.Items"), + resources.GetString("triggerCondAndCombo.Items1")}); + resources.ApplyResources(this.triggerCondAndCombo, "triggerCondAndCombo"); + this.triggerCondAndCombo.Name = "triggerCondAndCombo"; + // // cBGyroMouseXAxis // this.cBGyroMouseXAxis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -4110,21 +4127,6 @@ resources.ApplyResources(this.psTouchInvStripMenuItem, "psTouchInvStripMenuItem"); this.psTouchInvStripMenuItem.CheckedChanged += new System.EventHandler(this.TouchDisableInvert_CheckedChanged); // - // triggerCondAndCombo - // - this.triggerCondAndCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.triggerCondAndCombo.FormattingEnabled = true; - this.triggerCondAndCombo.Items.AddRange(new object[] { - resources.GetString("triggerCondAndCombo.Items"), - resources.GetString("triggerCondAndCombo.Items1")}); - resources.ApplyResources(this.triggerCondAndCombo, "triggerCondAndCombo"); - this.triggerCondAndCombo.Name = "triggerCondAndCombo"; - // - // label26 - // - resources.ApplyResources(this.label26, "label26"); - this.label26.Name = "label26"; - // // Options // resources.ApplyResources(this, "$this"); diff --git a/DS4Windows/DS4Forms/Options.resx b/DS4Windows/DS4Forms/Options.resx index dc50f18..f32fa8c 100644 --- a/DS4Windows/DS4Forms/Options.resx +++ b/DS4Windows/DS4Forms/Options.resx @@ -7165,6 +7165,9 @@ with profile Cubic + + Easeout Quad + 111, 3 @@ -7198,6 +7201,9 @@ with profile Cubic + + Easeout Quad + 31, 2 @@ -8971,9 +8977,6 @@ with profile 1011, 481 - - NoControl - 4, 4, 4, 4 @@ -9392,7 +9395,7 @@ with profile advColorDialog - DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.5.8.0, Culture=neutral, PublicKeyToken=null + DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.6.8.0, Culture=neutral, PublicKeyToken=null Options From 70909bdaa91823c815dc9f7690fbc18095e11ab9 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 29 Jan 2019 21:50:29 -0600 Subject: [PATCH 18/54] Added easeout quad curve option for other axes --- DS4Windows/DS4Control/Mapping.cs | 22 ++++++++++++++++++++++ DS4Windows/DS4Control/ScpUtil.cs | 2 ++ DS4Windows/DS4Forms/Options.Designer.cs | 12 ++++++++---- DS4Windows/DS4Forms/Options.resx | 12 ++++++++++++ 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 5664715..e0847fe 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -918,6 +918,11 @@ namespace DS4Windows double output = temp * temp * temp; dState.L2 = (byte)(output * 255.0); } + else if (l2OutCurveMode == 3) + { + double output = temp * (temp - 2.0); + dState.L2 = (byte)(-1.0 * output * 255.0); + } } int r2OutCurveMode = tempIntArray[device] = getR2OutCurveMode(device); @@ -934,6 +939,11 @@ namespace DS4Windows double output = temp * temp * temp; dState.R2 = (byte)(output * 255.0); } + else if (r2OutCurveMode == 3) + { + double output = temp * (temp - 2.0); + dState.R2 = (byte)(-1.0 * output * 255.0); + } } bool sOff = tempBool = isUsingSAforMouse(device); @@ -1009,6 +1019,12 @@ namespace DS4Windows result = (int)(output * 128.0); dState.Motion.outputAccelX = result; } + else if (sxOutCurveMode == 3) + { + double output = temp * (temp - 2.0); + result = (int)(-1.0 * output * 128.0); + dState.Motion.outputAccelX = result; + } } int szOutCurveMode = tempIntArray[device] = getSZOutCurveMode(device); @@ -1028,6 +1044,12 @@ namespace DS4Windows result = (int)(output * 128.0); dState.Motion.outputAccelZ = result; } + else if (szOutCurveMode == 3) + { + double output = temp * (temp - 2.0); + result = (int)(-1.0 * output * 128.0); + dState.Motion.outputAccelZ = result; + } } } diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 49a2906..e8d9f07 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -1610,6 +1610,7 @@ namespace DS4Windows case 0: break; case 1: result = "quadratic"; break; case 2: result = "cubic"; break; + case 3: result = "easeout-quad"; break; default: break; } @@ -1624,6 +1625,7 @@ namespace DS4Windows case "linear": id = 0; break; case "quadratic": id = 1; break; case "cubic": id = 2; break; + case "easeout-quad": id = 3; break; default: break; } diff --git a/DS4Windows/DS4Forms/Options.Designer.cs b/DS4Windows/DS4Forms/Options.Designer.cs index 184e813..bbd76ae 100644 --- a/DS4Windows/DS4Forms/Options.Designer.cs +++ b/DS4Windows/DS4Forms/Options.Designer.cs @@ -3137,7 +3137,8 @@ this.cBSixaxisZOutputCurve.Items.AddRange(new object[] { resources.GetString("cBSixaxisZOutputCurve.Items"), resources.GetString("cBSixaxisZOutputCurve.Items1"), - resources.GetString("cBSixaxisZOutputCurve.Items2")}); + resources.GetString("cBSixaxisZOutputCurve.Items2"), + resources.GetString("cBSixaxisZOutputCurve.Items3")}); resources.ApplyResources(this.cBSixaxisZOutputCurve, "cBSixaxisZOutputCurve"); this.cBSixaxisZOutputCurve.Name = "cBSixaxisZOutputCurve"; this.cBSixaxisZOutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBSixaxisZOutputCurve_SelectedIndexChanged); @@ -3150,7 +3151,8 @@ this.cBSixaxisXOutputCurve.Items.AddRange(new object[] { resources.GetString("cBSixaxisXOutputCurve.Items"), resources.GetString("cBSixaxisXOutputCurve.Items1"), - resources.GetString("cBSixaxisXOutputCurve.Items2")}); + resources.GetString("cBSixaxisXOutputCurve.Items2"), + resources.GetString("cBSixaxisXOutputCurve.Items3")}); resources.ApplyResources(this.cBSixaxisXOutputCurve, "cBSixaxisXOutputCurve"); this.cBSixaxisXOutputCurve.Name = "cBSixaxisXOutputCurve"; this.cBSixaxisXOutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBSixaxisXOutputCurve_SelectedIndexChanged); @@ -3173,7 +3175,8 @@ this.cBR2OutputCurve.Items.AddRange(new object[] { resources.GetString("cBR2OutputCurve.Items"), resources.GetString("cBR2OutputCurve.Items1"), - resources.GetString("cBR2OutputCurve.Items2")}); + resources.GetString("cBR2OutputCurve.Items2"), + resources.GetString("cBR2OutputCurve.Items3")}); resources.ApplyResources(this.cBR2OutputCurve, "cBR2OutputCurve"); this.cBR2OutputCurve.Name = "cBR2OutputCurve"; this.cBR2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBR2OutputCurve_SelectedIndexChanged); @@ -3186,7 +3189,8 @@ this.cBL2OutputCurve.Items.AddRange(new object[] { resources.GetString("cBL2OutputCurve.Items"), resources.GetString("cBL2OutputCurve.Items1"), - resources.GetString("cBL2OutputCurve.Items2")}); + resources.GetString("cBL2OutputCurve.Items2"), + resources.GetString("cBL2OutputCurve.Items3")}); resources.ApplyResources(this.cBL2OutputCurve, "cBL2OutputCurve"); this.cBL2OutputCurve.Name = "cBL2OutputCurve"; this.cBL2OutputCurve.SelectedIndexChanged += new System.EventHandler(this.cBL2OutputCurve_SelectedIndexChanged); diff --git a/DS4Windows/DS4Forms/Options.resx b/DS4Windows/DS4Forms/Options.resx index f32fa8c..4e941eb 100644 --- a/DS4Windows/DS4Forms/Options.resx +++ b/DS4Windows/DS4Forms/Options.resx @@ -6922,6 +6922,9 @@ with profile Cubic + + Easeout Quad + 221, 28 @@ -6952,6 +6955,9 @@ with profile Cubic + + Easeout Quad + 221, 1 @@ -7042,6 +7048,9 @@ with profile Cubic + + Easeout Quad + 111, 28 @@ -7072,6 +7081,9 @@ with profile Cubic + + Easeout Quad + 31, 28 From 7a35ca19cbfa66da2e9cb19bb9fab61f33194a25 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 29 Jan 2019 22:11:01 -0600 Subject: [PATCH 19/54] Fixed sixaxis easeout quad --- DS4Windows/DS4Control/Mapping.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index e0847fe..d797c6e 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1021,9 +1021,10 @@ namespace DS4Windows } else if (sxOutCurveMode == 3) { - double output = temp * (temp - 2.0); - result = (int)(-1.0 * output * 128.0); - dState.Motion.outputAccelX = result; + double abs = Math.Abs(temp); + double output = abs * (abs - 2.0); + dState.Motion.outputAccelX = (byte)(-1.0 * output * + sign * 128.0); } } @@ -1046,9 +1047,10 @@ namespace DS4Windows } else if (szOutCurveMode == 3) { - double output = temp * (temp - 2.0); - result = (int)(-1.0 * output * 128.0); - dState.Motion.outputAccelZ = result; + double abs = Math.Abs(temp); + double output = abs * (abs - 2.0); + dState.Motion.outputAccelZ = (byte)(-1.0 * output * + sign * 128.0); } } } From 4a7e233bd1f3fb20d4d34b87071515fac63b89cf Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 31 Jan 2019 00:50:37 -0600 Subject: [PATCH 20/54] Fixed bad refactor Fixes issue #561. --- DS4Windows/DS4Control/ScpUtil.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index e8d9f07..497d584 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -3556,7 +3556,7 @@ namespace DS4Windows DS4ControlSettings dcs = ds4settings[deviceNum][index]; if (shift) { - return dcs.shiftTrigger; + return dcs.shiftAction; } else { From ff870230a6587097771c2d99810659c6d9070703 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 31 Jan 2019 10:59:00 -0600 Subject: [PATCH 21/54] Implemented user defined gyro mouse dead zone Related to issue #338. --- DS4Windows/DS4Control/ControlService.cs | 5 +- DS4Windows/DS4Control/Mouse.cs | 2 + DS4Windows/DS4Control/MouseCursor.cs | 9 +- DS4Windows/DS4Control/ScpUtil.cs | 26 + DS4Windows/DS4Forms/Options.Designer.cs | 24 + DS4Windows/DS4Forms/Options.cs | 12 + DS4Windows/DS4Forms/Options.resx | 3976 +++++++++++++++++++---- 7 files changed, 3326 insertions(+), 728 deletions(-) diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs index 3d9c79b..82f5fb5 100644 --- a/DS4Windows/DS4Control/ControlService.cs +++ b/DS4Windows/DS4Control/ControlService.cs @@ -369,8 +369,9 @@ namespace DS4Windows { ProfilePath[i] = OlderProfilePath[i]; } - LoadProfile(i, false, this, false, false); + touchPad[i] = new Mouse(i, device); + LoadProfile(i, false, this, false, false); device.LightBarColor = getMainColor(i); if (!getDInputOnly(i) && device.isSynced()) @@ -604,8 +605,8 @@ namespace DS4Windows ProfilePath[Index] = OlderProfilePath[Index]; } - LoadProfile(Index, false, this, false, false); touchPad[Index] = new Mouse(Index, device); + LoadProfile(Index, false, this, false, false); device.LightBarColor = getMainColor(Index); int tempIdx = Index; diff --git a/DS4Windows/DS4Control/Mouse.cs b/DS4Windows/DS4Control/Mouse.cs index 701021c..7faaa72 100644 --- a/DS4Windows/DS4Control/Mouse.cs +++ b/DS4Windows/DS4Control/Mouse.cs @@ -23,6 +23,7 @@ namespace DS4Windows public bool priorLeftDown, priorRightDown, priorUpperDown, priorMultiDown; protected DS4Controls pushed = DS4Controls.None; protected Mapping.Click clicked = Mapping.Click.None; + public int CursorGyroDead { get => cursor.GyroCursorDeadZone; set => cursor.GyroCursorDeadZone = value; } internal const int TRACKBALL_INIT_FICTION = 10; internal const int TRACKBALL_MASS = 45; @@ -419,6 +420,7 @@ namespace DS4Windows } public bool dragging, dragging2; + private void synthesizeMouseButtons() { if (Global.GetDS4Action(deviceNum, DS4Controls.TouchLeft, false) == null && leftDown) diff --git a/DS4Windows/DS4Control/MouseCursor.cs b/DS4Windows/DS4Control/MouseCursor.cs index e437403..3cd0444 100644 --- a/DS4Windows/DS4Control/MouseCursor.cs +++ b/DS4Windows/DS4Control/MouseCursor.cs @@ -21,7 +21,7 @@ namespace DS4Windows private Direction hDirection = Direction.Neutral, vDirection = Direction.Neutral; private const double GYRO_MOUSE_COEFFICIENT = 0.0095; - private const int GYRO_MOUSE_DEADZONE = 10; + public const int GYRO_MOUSE_DEADZONE = 10; private const double GYRO_MOUSE_OFFSET = 0.1463; private const double GYRO_SMOOTH_MOUSE_OFFSET = 0.14698; private const double TOUCHPAD_MOUSE_OFFSET = 0.015; @@ -30,8 +30,9 @@ namespace DS4Windows private double[] xSmoothBuffer = new double[SMOOTH_BUFFER_LEN]; private double[] ySmoothBuffer = new double[SMOOTH_BUFFER_LEN]; private int smoothBufferTail = 0; + private int gyroCursorDeadZone = GYRO_MOUSE_DEADZONE; + public int GyroCursorDeadZone { get => gyroCursorDeadZone; set => gyroCursorDeadZone = value; } - double coefficient = 0.0; double verticalScale = 0.0; @@ -80,8 +81,8 @@ namespace DS4Windows vRemainder = 0.0; } - int deadzoneX = (int)Math.Abs(normX * GYRO_MOUSE_DEADZONE); - int deadzoneY = (int)Math.Abs(normY * GYRO_MOUSE_DEADZONE); + int deadzoneX = (int)Math.Abs(normX * gyroCursorDeadZone); + int deadzoneY = (int)Math.Abs(normY * gyroCursorDeadZone); if (Math.Abs(deltaX) > deadzoneX) { diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 497d584..3430e23 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -778,6 +778,17 @@ namespace DS4Windows return m_Config.gyroMouseHorizontalAxis[index]; } + public static int[] GyroMouseDeadZone => m_Config.gyroMouseDZ; + public static int GetGyroMouseDeadZone(int index) + { + return m_Config.gyroMouseDZ[index]; + } + + public static void SetGyroMouseDeadZone(int index, int value, ControlService control) + { + m_Config.SetGyroMouseDZ(index, value, control); + } + public static DS4Color[] MainColor => m_Config.m_Leds; public static DS4Color getMainColor(int index) { @@ -1437,6 +1448,9 @@ namespace DS4Windows public int[] flashAt = new int[5] { 0, 0, 0, 0, 0 }; public bool[] mouseAccel = new bool[5] { true, true, true, true, true }; public int[] btPollRate = new int[5] { 4, 4, 4, 4, 4 }; + public int[] gyroMouseDZ = new int[5] { MouseCursor.GYRO_MOUSE_DEADZONE, MouseCursor.GYRO_MOUSE_DEADZONE, + MouseCursor.GYRO_MOUSE_DEADZONE, MouseCursor.GYRO_MOUSE_DEADZONE, + MouseCursor.GYRO_MOUSE_DEADZONE }; public int[] lsOutCurveMode = new int[5] { 0, 0, 0, 0, 0 }; public int[] rsOutCurveMode = new int[5] { 0, 0, 0, 0, 0 }; public int[] l2OutCurveMode = new int[5] { 0, 0, 0, 0, 0 }; @@ -1656,6 +1670,13 @@ namespace DS4Windows sATriggerCond[index] = SaTriggerCondValue(text); } + public void SetGyroMouseDZ(int index, int value, ControlService control) + { + gyroMouseDZ[index] = value; + if (index < 4 && control.touchPad[index] != null) + control.touchPad[index].CursorGyroDead = value; + } + public bool SaveProfile(int device, string propath) { bool Saved = true; @@ -1757,6 +1778,7 @@ namespace DS4Windows XmlNode xmlGyroSmoothWeight = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroSmoothingWeight", null); xmlGyroSmoothWeight.InnerText = Convert.ToInt32(gyroSmoothWeight[device] * 100).ToString(); Node.AppendChild(xmlGyroSmoothWeight); XmlNode xmlGyroSmoothing = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroSmoothing", null); xmlGyroSmoothing.InnerText = gyroSmoothing[device].ToString(); Node.AppendChild(xmlGyroSmoothing); 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 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); @@ -2656,6 +2678,10 @@ namespace DS4Windows try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseHAxis"); int temp = 0; int.TryParse(Item.InnerText, out temp); gyroMouseHorizontalAxis[device] = Math.Min(Math.Max(0, temp), 1); } catch { gyroMouseHorizontalAxis[device] = 0; missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseDeadZone"); int.TryParse(Item.InnerText, out int temp); + SetGyroMouseDZ(device, temp, control); } + catch { SetGyroMouseDZ(device, MouseCursor.GYRO_MOUSE_DEADZONE, control); missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LSCurve"); int.TryParse(Item.InnerText, out lsCurve[device]); } catch { lsCurve[device] = 0; missingSetting = true; } diff --git a/DS4Windows/DS4Forms/Options.Designer.cs b/DS4Windows/DS4Forms/Options.Designer.cs index bbd76ae..ecd459a 100644 --- a/DS4Windows/DS4Forms/Options.Designer.cs +++ b/DS4Windows/DS4Forms/Options.Designer.cs @@ -315,6 +315,8 @@ this.rBSAControls = new System.Windows.Forms.RadioButton(); this.rBSAMouse = new System.Windows.Forms.RadioButton(); this.pnlSAMouse = new System.Windows.Forms.Panel(); + this.label27 = new System.Windows.Forms.Label(); + this.gyroMouseDzNUD = new System.Windows.Forms.NumericUpDown(); this.label26 = new System.Windows.Forms.Label(); this.triggerCondAndCombo = new System.Windows.Forms.ComboBox(); this.cBGyroMouseXAxis = new System.Windows.Forms.ComboBox(); @@ -470,6 +472,7 @@ this.fLPSettings.SuspendLayout(); this.gBGyro.SuspendLayout(); this.pnlSAMouse.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gyroMouseDzNUD)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDGyroSmoothWeight)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDGyroMouseVertScale)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDGyroSensitivity)).BeginInit(); @@ -3392,6 +3395,8 @@ // // pnlSAMouse // + this.pnlSAMouse.Controls.Add(this.label27); + this.pnlSAMouse.Controls.Add(this.gyroMouseDzNUD); this.pnlSAMouse.Controls.Add(this.label26); this.pnlSAMouse.Controls.Add(this.triggerCondAndCombo); this.pnlSAMouse.Controls.Add(this.cBGyroMouseXAxis); @@ -3414,6 +3419,22 @@ resources.ApplyResources(this.pnlSAMouse, "pnlSAMouse"); this.pnlSAMouse.Name = "pnlSAMouse"; // + // label27 + // + resources.ApplyResources(this.label27, "label27"); + this.label27.Name = "label27"; + // + // gyroMouseDzNUD + // + resources.ApplyResources(this.gyroMouseDzNUD, "gyroMouseDzNUD"); + this.gyroMouseDzNUD.Name = "gyroMouseDzNUD"; + this.gyroMouseDzNUD.Value = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.gyroMouseDzNUD.ValueChanged += new System.EventHandler(this.gyroMouseDzNUD_ValueChanged); + // // label26 // resources.ApplyResources(this.label26, "label26"); @@ -4240,6 +4261,7 @@ this.gBGyro.PerformLayout(); this.pnlSAMouse.ResumeLayout(false); this.pnlSAMouse.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gyroMouseDzNUD)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDGyroSmoothWeight)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDGyroMouseVertScale)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nUDGyroSensitivity)).EndInit(); @@ -4620,5 +4642,7 @@ private System.Windows.Forms.CheckBox trackballCk; private System.Windows.Forms.Label label26; private System.Windows.Forms.ComboBox triggerCondAndCombo; + private System.Windows.Forms.Label label27; + private System.Windows.Forms.NumericUpDown gyroMouseDzNUD; } } \ No newline at end of file diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index 7c9aa91..368dfff 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -718,6 +718,7 @@ namespace DS4Windows nUDGyroSmoothWeight.Value = (decimal)(GyroSmoothingWeight[device]); cBGyroMouseXAxis.SelectedIndex = GyroMouseHorizontalAxis[device]; triggerCondAndCombo.SelectedIndex = SATriggerCond[device] ? 0 : 1; + gyroMouseDzNUD.Value = GyroMouseDeadZone[device]; } else { @@ -834,6 +835,7 @@ namespace DS4Windows cBGyroInvertY.Checked = false; cBGyroSmooth.Checked = false; nUDGyroSmoothWeight.Value = 0.5m; + gyroMouseDzNUD.Value = MouseCursor.GYRO_MOUSE_DEADZONE; cBGyroMouseXAxis.SelectedIndex = 0; triggerCondAndCombo.SelectedIndex = 0; Set(); @@ -1334,6 +1336,7 @@ namespace DS4Windows GyroSmoothing[device] = cBGyroSmooth.Checked; GyroSmoothingWeight[device] = (double)nUDGyroSmoothWeight.Value; GyroMouseHorizontalAxis[device] = cBGyroMouseXAxis.SelectedIndex; + SetGyroMouseDeadZone(device, (int)gyroMouseDzNUD.Value, Program.rootHub); int invert = 0; if (cBGyroInvertX.Checked) @@ -2989,6 +2992,15 @@ namespace DS4Windows } } + private void gyroMouseDzNUD_ValueChanged(object sender, EventArgs e) + { + if (loading == false) + { + SetGyroMouseDeadZone(device, (int)gyroMouseDzNUD.Value, + Program.rootHub); + } + } + private void trackFrictionNUD_ValueChanged(object sender, EventArgs e) { if (loading == false) diff --git a/DS4Windows/DS4Forms/Options.resx b/DS4Windows/DS4Forms/Options.resx index 4e941eb..5dffefb 100644 --- a/DS4Windows/DS4Forms/Options.resx +++ b/DS4Windows/DS4Forms/Options.resx @@ -148,7 +148,7 @@ 0 - 30, 215 + 28, 207 39, 20 @@ -256,7 +256,7 @@ NoControl - 6, 191 + 6, 184 111, 17 @@ -346,7 +346,7 @@ NoControl - 72, 218 + 70, 210 59, 13 @@ -1335,6 +1335,198 @@ 1 + + pnlTPMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 0 + + + rBTPControls + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 1 + + + rBTPMouse + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 2 + + + fLPTouchSwipe + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 3 + + + 2, 259 + + + 270, 190 + + + 246 + + + Touchpad + + + gBTouchpad + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPControls + + + 1 + + + trackFrictionLb + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlTPMouse + + + 0 + + + trackFrictionNUD + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlTPMouse + + + 1 + + + trackballCk + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlTPMouse + + + 2 + + + touchpadDisInvertButton + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlTPMouse + + + 3 + + + label25 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlTPMouse + + + 4 + + + label15 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlTPMouse + + + 5 + + + touchpadInvertComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlTPMouse + + + 6 + + + cbStartTouchpadOff + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlTPMouse + + + 16 + + + 0, 36 + + + 2, 2, 2, 2 + + + 266, 149 + + + 257 + + + pnlTPMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 0 + True @@ -1566,30 +1758,6 @@ 16 - - 0, 36 - - - 2, 2, 2, 2 - - - 266, 149 - - - 257 - - - pnlTPMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 0 - True @@ -1656,156 +1824,126 @@ 2 + + bnSwipeUp + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 0 + + + lbSwipeUp + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 1 + + + bnSwipeDown + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 2 + + + lbSwipeDown + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 3 + + + bnSwipeLeft + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 4 + + + lbSwipeLeft + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 5 + + + bnSwipeRight + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 6 + + + lbSwipeRight + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTouchSwipe + + + 7 + + + 6, 40 + + + 260, 148 + + + 256 + + + fLPTouchSwipe + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 3 + 326, 13 - - False - - - 117, 22 - - - Control - - - 114, 6 - - - 117, 22 - - - Default - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Dpad - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Left Stick - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Right Stick - - - 117, 22 - - - Face Buttons - - - 147, 22 - - - w/ Scan Code - - - False - - - 117, 22 - - - WASD - - - 147, 22 - - - w/ Scan Code - - - 117, 22 - - - Arrow Keys - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Mouse - 118, 208 @@ -1845,6 +1983,153 @@ 0 + + False + + + 117, 22 + + + Control + + + 114, 6 + + + 117, 22 + + + Default + + + 117, 22 + + + Dpad + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Left Stick + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Right Stick + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Face Buttons + + + False + + + 117, 22 + + + WASD + + + 147, 22 + + + w/ Scan Code + + + 117, 22 + + + Arrow Keys + + + 147, 22 + + + w/ Scan Code + + + 117, 22 + + + Mouse + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + NoControl @@ -2067,50 +2352,173 @@ 7 - - 6, 40 + + btPollRateLabel - - 260, 148 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 256 + + gBOther - - fLPTouchSwipe + + 0 - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + btPollRateComboBox - - gBTouchpad + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + gBOther + + + 1 + + + enableTouchToggleCheckbox + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 2 + + + cBDinput + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + 3 - - 2, 259 + + pBProgram - - 270, 190 + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 246 + + gBOther - - Touchpad + + 4 - - gBTouchpad + + cBLaunchProgram - + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 5 + + + btnBrowse + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 6 + + + lbUseController + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 7 + + + cBMouseAccel + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 8 + + + nUDSixaxis + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 9 + + + cBControllerInput + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 10 + + + cBIdleDisconnect + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBOther + + + 12 + + + 281, 221 + + + 272, 256 + + + 247 + + + Other + + + gBOther + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tPControls + + fLPSettings - - 1 + + 5 True @@ -2524,35 +2932,155 @@ with profile 12 - - 281, 221 + + btnRainbow - - 272, 256 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + gBLightbar + + + 0 + + + lbRainbowB + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 1 + + + nUDRainbowB + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 2 + + + cBFlashType + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 3 + + + cBWhileCharging + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 4 + + + btnFlashColor + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 5 + + + btnChargingColor + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 6 + + + lbWhileCharging + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 7 + + + lbPercentFlashBar + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 8 + + + nUDflashLED + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBLightbar + + + 9 + + + 3, 3 + + + 272, 233 + + 247 - - Other + + Lightbar - - gBOther + + gBLightbar - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + fLPSettings - - 5 + + 0 NoControl - 6, 214 + 4, 206 2, 2, 2, 2 @@ -2582,7 +3110,7 @@ with profile NoControl - 203, 214 + 201, 206 15, 13 @@ -2609,7 +3137,7 @@ with profile 1 - 151, 214 + 149, 206 43, 20 @@ -2639,7 +3167,7 @@ with profile Pulse at - 4, 133 + 6, 123 68, 21 @@ -2672,7 +3200,7 @@ with profile Color - 91, 166 + 90, 156 121, 21 @@ -2702,7 +3230,7 @@ with profile NoControl - 146, 137 + 148, 127 13, 13 @@ -2729,7 +3257,7 @@ with profile NoControl - 218, 168 + 217, 158 13, 13 @@ -2759,7 +3287,7 @@ with profile NoControl - 5, 167 + 4, 157 82, 13 @@ -2813,7 +3341,7 @@ with profile 8 - 78, 134 + 80, 124 43, 20 @@ -2833,29 +3361,53 @@ with profile 9 - - 3, 3 + + lbPercentRumble - - 272, 244 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + gBRumble + + + 0 + + + btnRumbleLightTest + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBRumble + + + 1 + + + 281, 3 + + + 272, 46 + + 247 - - Lightbar + + Rumble - - gBLightbar + + gBRumble - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + fLPSettings - - 0 + + 2 True @@ -2914,30 +3466,6 @@ with profile 1 - - 281, 3 - - - 272, 46 - - - 247 - - - Rumble - - - gBRumble - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 2 - True @@ -3046,6 +3574,225 @@ with profile 153, 17 + + pnlSATrack + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 0 + + + lbL2Track + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 1 + + + lbRSTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 2 + + + lbInputDelay + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 3 + + + lbR2Track + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 4 + + + lbLSTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 5 + + + lbSATip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 6 + + + tBR2 + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 7 + + + tBL2 + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 8 + + + pnlSixaxis + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 9 + + + pnlLSTrack + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 10 + + + pnlRSTrack + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 11 + + + 4, 22 + + + 3, 3, 3, 3 + + + 438, 455 + + + 2 + + + Controller Readings + + + lbL2TrackS + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCControls + + + 2 + + + btnSATrack + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSATrack + + + 0 + + + btnSATrackS + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSATrack + + + 1 + + + 300, 88 + + + 2, 2, 2, 2 + + + 125, 125 + + + 252 + + + pnlSATrack + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 0 + False @@ -3109,30 +3856,6 @@ with profile 1 - - 300, 88 - - - 2, 2, 2, 2 - - - 125, 125 - - - 252 - - - pnlSATrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 0 - True @@ -3397,6 +4120,123 @@ with profile 8 + + tBsixaxisAccelX + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 0 + + + lb6Accel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 1 + + + tBsixaxisGyroX + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 2 + + + lb6Gryo + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 3 + + + tBsixaxisGyroY + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 4 + + + tBsixaxisGyroZ + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 5 + + + tBsixaxisAccelY + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 6 + + + tBsixaxisAccelZ + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSixaxis + + + 7 + + + 300, 233 + + + 125, 125 + + + 236 + + + pnlSixaxis + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 9 + False @@ -3619,26 +4459,53 @@ with profile 7 - - 300, 233 + + btnLSTrack - + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlLSTrack + + + 0 + + + btnLSTrackS + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlLSTrack + + + 1 + + + 5, 88 + + + 2, 2, 2, 2 + + 125, 125 - - 236 + + 250 - - pnlSixaxis + + pnlLSTrack - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + lbL2TrackS - - 9 + + 10 False @@ -3703,29 +4570,53 @@ with profile 1 - - 5, 88 + + btnRSTrackS - + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlRSTrack + + + 0 + + + btnRSTrack + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlRSTrack + + + 1 + + + 151, 88 + + 2, 2, 2, 2 - + 125, 125 - - 250 + + 251 - - pnlLSTrack + + pnlRSTrack - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + lbL2TrackS - - 10 + + 11 False @@ -3790,56 +4681,122 @@ with profile 1 - - 151, 88 + + bnGyroZN - - 2, 2, 2, 2 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 125, 125 + + fLPTiltControls - - 251 + + 0 - - pnlRSTrack + + lbGyroZN - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - lbL2TrackS + + fLPTiltControls - - 11 + + 1 - - 4, 22 + + bnGyroZP - - 3, 3, 3, 3 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 438, 455 + + fLPTiltControls - + 2 - - Controller Readings + + lbGyroZP - - lbL2TrackS + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + fLPTiltControls - - tCControls + + 3 - - 2 + + bnGyroXP + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTiltControls + + + 4 + + + lbGyroXP + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTiltControls + + + 5 + + + bnGyroXN + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTiltControls + + + 6 + + + lbGyroXN + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPTiltControls + + + 7 + + + 4, 43 + + + 271, 167 + + + 254 + + + fLPTiltControls + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBGyro + + + 3 NoControl @@ -4057,30 +5014,120 @@ with profile 7 - - 4, 43 + + tPControls - - 271, 167 + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 254 + + tCControls - - fLPTiltControls + + 0 - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tPSpecial - - gBGyro + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + tCControls + + + 1 + + + Left + + + 0, 0 + + + 446, 481 + + + 253 + + + tCControls + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 True + + lBControls + + + System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPControls + + + 0 + + + lbControlTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPControls + + + 2 + + + pnlController + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPControls + + + 3 + + + 4, 22 + + + 3, 3, 3, 3 + + + 438, 455 + + + 0 + + + Controls + + + tPControls + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCControls + + + 0 + Top, Bottom, Left @@ -4240,6 +5287,654 @@ with profile Zoom + + pBHoveredButton + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 0 + + + lbLRS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 1 + + + lbLLS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 2 + + + bnRSDown + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 3 + + + lbLTouchUpper + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 4 + + + lbLTouchRight + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 5 + + + bnL3 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 6 + + + lbLTouchLM + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 7 + + + bnRSUp + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 8 + + + lbLR2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 9 + + + bnRSRight + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 10 + + + lbLL2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 11 + + + bnR3 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 12 + + + lbLR1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 13 + + + bnRSLeft + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 14 + + + lbLL1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 15 + + + bnLSLeft + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 16 + + + lbLPS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 17 + + + bnLSUp + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 18 + + + lbLLeft + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 19 + + + bnLSRight + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 20 + + + lbLright + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 21 + + + bnLSDown + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 22 + + + lbLDown + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 23 + + + bnR2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 24 + + + bnUp + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 25 + + + bnDown + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 26 + + + bnTriangle + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 27 + + + bnR1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 28 + + + bnSquare + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 29 + + + bnRight + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 30 + + + lbLUp + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 31 + + + bnLeft + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 32 + + + lbLShare + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 33 + + + bnOptions + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 34 + + + bnShare + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 35 + + + lbLOptions + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 36 + + + bnL1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 37 + + + bnTouchRight + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 38 + + + bnL2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 39 + + + lbLTriangle + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 40 + + + bnTouchLeft + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 41 + + + lbLSquare + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 42 + + + bnTouchMulti + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 43 + + + lbLCircle + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 44 + + + lbLCross + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 45 + + + bnTouchUpper + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 46 + + + btnLightbar + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 47 + + + bnPS + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 48 + + + bnCross + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 49 + + + bnCircle + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 50 + + + lbControlName + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlController + + + 51 + + + 2, 2 + + + 2, 2, 2, 2 + + + 422, 230 + + + 282 + + + pnlController + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPControls + + + 3 + False @@ -5890,74 +7585,89 @@ with profile 51 - - 2, 2 + + pnlActions - - 2, 2, 2, 2 - - - 422, 230 - - - 282 - - - pnlController - - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tPControls + + tPSpecial - - 3 + + 0 - + 4, 22 - - 3, 3, 3, 3 - - + 438, 455 - - 0 + + 3 - - Controls + + Special Actions - - tPControls + + tPSpecial - + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tCControls - + + 1 + + + lVActions + + + System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlActions + + 0 - - Name + + panel2 - - 140 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Trigger + + pnlActions - - 105 + + 1 - - Action + + Fill - - 100 + + 0, 0 + + + 438, 455 + + + 15 + + + pnlActions + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPSpecial + + + 0 Fill @@ -5983,6 +7693,135 @@ with profile 0 + + Name + + + 140 + + + Trigger + + + 105 + + + Action + + + 100 + + + fLPActionButtons + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + + + lbActionsTip + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 1 + + + Top + + + 0, 0 + + + 2, 2, 2, 2 + + + 438, 66 + + + 16 + + + panel2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlActions + + + 1 + + + btnNewAction + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPActionButtons + + + 0 + + + btnEditAction + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPActionButtons + + + 1 + + + btnRemAction + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPActionButtons + + + 2 + + + Fill + + + 0, 28 + + + 438, 38 + + + 15 + + + fLPActionButtons + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + NoControl @@ -6064,30 +7903,6 @@ with profile 2 - - Fill - - - 0, 28 - - - 438, 38 - - - 15 - - - fLPActionButtons - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 0 - Top @@ -6121,104 +7936,98 @@ with profile 1 - - Top + + tPDeadzone - - 0, 0 - - - 2, 2, 2, 2 - - - 438, 66 - - - 16 - - - panel2 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlActions - - - 1 - - - Fill - - - 0, 0 - - - 438, 455 - - - 15 - - - pnlActions - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPSpecial - - - 0 - - - 4, 22 - - - 438, 455 - - - 3 - - - Special Actions - - - tPSpecial - - + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tCControls + + tCSens - + + 0 + + + antiDeadzoneTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + 1 - - Left + + maxZoneTabPage - - 0, 0 + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 446, 481 + + tCSens - - 253 + + 2 - - tCControls + + tPOutCurve - + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 3 + + + tPCurve + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 4 + + + tpRotation + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 5 + + + 281, 55 + + + 272, 78 + + + 234 + + + tCSens + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + fLPSettings - - 4 + + 3 4, 22 @@ -6247,6 +8056,177 @@ with profile 0 + + nUDSixaxisZAntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 0 + + + nUDSixaxisXAntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 1 + + + label20 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 2 + + + label19 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 3 + + + nUDR2AntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 4 + + + label3 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 5 + + + nUDL2AntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 6 + + + label4 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 7 + + + nUDRSAntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 8 + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 9 + + + nUDLSAntiDead + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 10 + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + antiDeadzoneTabPage + + + 11 + + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 2 + + + Anti-Deadzone + + + antiDeadzoneTabPage + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 1 + 214, 29 @@ -6553,32 +8533,176 @@ with profile 11 - - 4, 22 + + nUDSixAxisZMaxZone - - 3, 3, 3, 3 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 264, 52 + + maxZoneTabPage - + + 0 + + + nUDSixAxisXMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 1 + + + label18 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + 2 - - Anti-Deadzone + + label17 - - antiDeadzoneTabPage + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + maxZoneTabPage + + + 3 + + + nUDR2Maxzone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 4 + + + nUDL2Maxzone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 5 + + + label8 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 6 + + + label7 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 7 + + + nUDRSMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 8 + + + label6 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 9 + + + nUDLSMaxZone + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 10 + + + label5 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + maxZoneTabPage + + + 11 + + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 3 + + + Max Zone + + + maxZoneTabPage + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tCSens - - 1 + + 2 220, 29 @@ -6886,32 +9010,173 @@ with profile 11 - - 4, 22 + + cBSixaxisZOutputCurve - - 3, 3, 3, 3 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 264, 52 + + tPOutCurve - + + 0 + + + cBSixaxisXOutputCurve + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 1 + + + label24 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 2 + + + label23 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + 3 - - Max Zone + + cBR2OutputCurve - - maxZoneTabPage + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + tPOutCurve + + + 4 + + + cBL2OutputCurve + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 5 + + + label22 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 6 + + + label21 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 7 + + + rsOutCurveComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 8 + + + lsOutCurveComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 9 + + + label10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 10 + + + label9 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPOutCurve + + + 11 + + + 4, 22 + + + 264, 52 + + + 4 + + + Output Curve + + + tPOutCurve + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tCSens - - 2 + + 3 Linear @@ -7297,29 +9562,104 @@ with profile 11 - - 4, 22 + + nUDLSCurve - - 264, 52 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + tPCurve + + + 0 + + + nUDRSCurve + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 1 + + + lbRSCurve + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 2 + + + lbRSCurvePercent + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + + 3 + + + lbLSCurvePercent + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tPCurve + + 4 - - Output Curve + + lbLSCurve - - tPOutCurve + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + tPCurve + + + 5 + + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 1 + + + Curve (Input) + + + tPCurve + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tCSens - - 3 + + 4 36, 16 @@ -7489,32 +9829,80 @@ with profile 5 - - 4, 22 + + nUDRSRotation - - 3, 3, 3, 3 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 264, 52 + + tpRotation - + + 0 + + + label14 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpRotation + + 1 - - Curve (Input) + + nUDLSRotation - - tPCurve + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + tpRotation + + + 2 + + + label13 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpRotation + + + 3 + + + 4, 22 + + + 3, 3, 3, 3 + + + 264, 52 + + + 5 + + + Rotation + + + tpRotation + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tCSens - - 4 + + 5 160, 21 @@ -7618,54 +10006,6 @@ with profile 3 - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 5 - - - Rotation - - - tpRotation - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 5 - - - 281, 55 - - - 272, 78 - - - 234 - - - tCSens - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 3 - True @@ -7735,6 +10075,54 @@ with profile 1 + + True + + + 6, 158 + + + 56, 13 + + + 275 + + + Deadzone + + + label27 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 0 + + + 94, 156 + + + 43, 20 + + + 274 + + + gyroMouseDzNUD + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 1 + True @@ -7763,7 +10151,7 @@ with profile pnlSAMouse - 0 + 2 And @@ -7772,7 +10160,7 @@ with profile Or - 165, 67 + 165, 62 73, 21 @@ -7790,7 +10178,7 @@ with profile pnlSAMouse - 1 + 3 Yaw @@ -7799,7 +10187,7 @@ with profile Roll - 170, 114 + 169, 107 74, 21 @@ -7817,7 +10205,7 @@ with profile pnlSAMouse - 2 + 4 True @@ -7826,7 +10214,7 @@ with profile NoControl - 167, 95 + 166, 91 39, 13 @@ -7847,7 +10235,7 @@ with profile pnlSAMouse - 3 + 5 True @@ -7856,7 +10244,7 @@ with profile NoControl - 8, 145 + 6, 139 60, 13 @@ -7877,7 +10265,7 @@ with profile pnlSAMouse - 4 + 6 True @@ -7886,7 +10274,7 @@ with profile NoControl - 75, 145 + 73, 139 Yes @@ -7907,7 +10295,7 @@ with profile pnlSAMouse - 5 + 7 True @@ -7916,7 +10304,7 @@ with profile NoControl - 96, 145 + 94, 139 83, 13 @@ -7937,13 +10325,13 @@ with profile pnlSAMouse - 6 + 8 False - 185, 141 + 183, 135 55, 20 @@ -7961,7 +10349,7 @@ with profile pnlSAMouse - 7 + 9 True @@ -7991,10 +10379,10 @@ with profile pnlSAMouse - 8 + 10 - 96, 93 + 95, 89 49, 20 @@ -8012,7 +10400,7 @@ with profile pnlSAMouse - 9 + 11 True @@ -8021,7 +10409,7 @@ with profile NoControl - 8, 95 + 7, 91 75, 13 @@ -8042,7 +10430,7 @@ with profile pnlSAMouse - 10 + 12 True @@ -8075,7 +10463,7 @@ with profile pnlSAMouse - 11 + 13 True @@ -8084,7 +10472,7 @@ with profile NoControl - 92, 119 + 95, 114 Yes @@ -8108,7 +10496,7 @@ with profile pnlSAMouse - 12 + 14 True @@ -8117,7 +10505,7 @@ with profile NoControl - 49, 119 + 52, 114 Yes @@ -8141,7 +10529,7 @@ with profile pnlSAMouse - 13 + 15 True @@ -8150,7 +10538,7 @@ with profile NoControl - 8, 119 + 11, 114 37, 13 @@ -8174,7 +10562,7 @@ with profile pnlSAMouse - 14 + 16 True @@ -8207,7 +10595,7 @@ with profile pnlSAMouse - 15 + 17 NoControl @@ -8237,10 +10625,10 @@ with profile pnlSAMouse - 16 + 18 - 96, 67 + 96, 62 49, 20 @@ -8258,7 +10646,7 @@ with profile pnlSAMouse - 17 + 19 True @@ -8267,7 +10655,7 @@ with profile NoControl - 8, 69 + 8, 64 82, 13 @@ -8291,16 +10679,16 @@ with profile pnlSAMouse - 18 + 20 - 6, 43 + 6, 39 2, 2, 2, 2 - 263, 170 + 263, 181 259 @@ -8318,7 +10706,7 @@ with profile 2 - 3, 253 + 3, 242 272, 224 @@ -8341,6 +10729,204 @@ with profile 1 + + lbL2S + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 0 + + + nUDL2S + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 1 + + + nUDLSS + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 2 + + + lbSixaxisXS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 3 + + + nUDR2S + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 4 + + + lbSixaxisZS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 5 + + + nUDRSS + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 6 + + + lbR2LS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 7 + + + nUDSXS + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 8 + + + lbRSS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 9 + + + lbLSS + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 10 + + + nUDSZS + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBSensitivity + + + 11 + + + 281, 139 + + + 272, 76 + + + 257 + + + Sensitivity + + + gBSensitivity + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 4 + + + Fill + + + TopDown + + + 446, 0 + + + 2, 2, 2, 2 + + + 565, 481 + + + 254 + + + fLPSettings + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + True @@ -8659,63 +11245,18 @@ with profile 11 - - 281, 139 - - - 272, 76 - - - 257 - - - Sensitivity - - - gBSensitivity - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 4 - - - Fill - - - TopDown - - - 446, 0 - - - 2, 2, 2, 2 - - - 565, 481 - - - 254 - - - fLPSettings - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - 482, 17 + + 195, 444 + + + cMGyroTriggers + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 194, 22 @@ -8836,18 +11377,18 @@ with profile Always on - - 195, 444 - - - cMGyroTriggers - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 144, 63 + + 195, 422 + + + cMTouchDisableInvert + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 194, 22 @@ -8962,15 +11503,6 @@ with profile PS - - 195, 422 - - - cMTouchDisableInvert - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 647, 17 From 6eb5ddf58980735ecb2121152610bebca5839c82 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 31 Jan 2019 11:48:01 -0600 Subject: [PATCH 22/54] Increase minimum size of Options form --- DS4Windows/DS4Forms/Options.resx | 480 +++++++++++++++++++++++++------ 1 file changed, 396 insertions(+), 84 deletions(-) diff --git a/DS4Windows/DS4Forms/Options.resx b/DS4Windows/DS4Forms/Options.resx index 5dffefb..6826eb5 100644 --- a/DS4Windows/DS4Forms/Options.resx +++ b/DS4Windows/DS4Forms/Options.resx @@ -5045,7 +5045,7 @@ with profile 0, 0 - 446, 481 + 446, 511 253 @@ -5108,7 +5108,7 @@ with profile 3, 3, 3, 3 - 438, 455 + 438, 485 0 @@ -5234,7 +5234,7 @@ with profile 278, 254 - 157, 186 + 157, 212 180 @@ -10009,6 +10009,120 @@ with profile True + + gBGyro + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 1 + + + gBSensitivity + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 4 + + + Fill + + + TopDown + + + 446, 0 + + + 2, 2, 2, 2 + + + 565, 511 + + + 254 + + + fLPSettings + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + rBSAControls + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBGyro + + + 0 + + + rBSAMouse + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBGyro + + + 1 + + + pnlSAMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBGyro + + + 2 + + + 3, 242 + + + 272, 224 + + + 248 + + + Gyro + + + gBGyro + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 1 + True @@ -10075,6 +10189,282 @@ with profile 1 + + label27 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 0 + + + gyroMouseDzNUD + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 1 + + + label26 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 2 + + + triggerCondAndCombo + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 3 + + + cBGyroMouseXAxis + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 4 + + + label16 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 5 + + + lbGyroSmooth + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 6 + + + cBGyroSmooth + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 7 + + + lbSmoothWeight + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 8 + + + nUDGyroSmoothWeight + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 9 + + + label12 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 10 + + + nUDGyroMouseVertScale + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 11 + + + label11 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 12 + + + gyroTriggerBehavior + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 13 + + + cBGyroInvertY + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 14 + + + cBGyroInvertX + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 15 + + + lbGyroInvert + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 16 + + + lbGyroTriggers + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 17 + + + btnGyroTriggers + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 18 + + + nUDGyroSensitivity + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 19 + + + lbGyroSens + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSAMouse + + + 20 + + + 6, 39 + + + 2, 2, 2, 2 + + + 263, 181 + + + 259 + + + pnlSAMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBGyro + + + 2 + True @@ -10681,54 +11071,6 @@ with profile 20 - - 6, 39 - - - 2, 2, 2, 2 - - - 263, 181 - - - 259 - - - pnlSAMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 2 - - - 3, 242 - - - 272, 224 - - - 248 - - - Gyro - - - gBGyro - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 1 - lbL2S @@ -10897,36 +11239,6 @@ with profile 4 - - Fill - - - TopDown - - - 446, 0 - - - 2, 2, 2, 2 - - - 565, 481 - - - 254 - - - fLPSettings - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - True @@ -11519,16 +11831,16 @@ with profile True - 1011, 481 + 1011, 511 4, 4, 4, 4 - 1027, 520 + 1027, 550 - 18, 94 + 18, 520 Profile Options From dd96beafbe2ff8849318acc18a5be409d9b36454 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 31 Jan 2019 16:19:08 -0600 Subject: [PATCH 23/54] Purged old state mapping code that required dictionary object --- DS4Windows/DS4Control/Mapping.cs | 203 +++++-------------------------- 1 file changed, 31 insertions(+), 172 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index d797c6e..c78a7fa 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1183,7 +1183,7 @@ namespace DS4Windows cState.CopyTo(MappedState); - Dictionary tempControlDict = new Dictionary(); + //Dictionary tempControlDict = new Dictionary(); //MultiValueDict tempControlDict = new MultiValueDict(); DS4Controls usingExtra = DS4Controls.None; List tempSettingsList = getDS4CSettings(device); @@ -1345,10 +1345,38 @@ namespace DS4Windows xboxControl = getX360ControlsByName(action.ToString()); } - if (xboxControl >= X360Controls.LXNeg && xboxControl <= X360Controls.Start) + if (xboxControl >= X360Controls.LXNeg && xboxControl <= X360Controls.RYPos) { DS4Controls tempDS4Control = reverseX360ButtonMapping[(int)xboxControl]; - tempControlDict.Add(dcs.control, tempDS4Control); + int controlNum = (int)dcs.control; + int tempOutControl = (int)tempDS4Control; + DS4StateFieldMapping.ControlType controlType = DS4StateFieldMapping.mappedType[tempOutControl]; + bool alt = controlType == DS4StateFieldMapping.ControlType.AxisDir && tempOutControl % 2 == 0 ? true : false; + byte axisMapping = getXYAxisMapping2(device, dcs.control, cState, eState, tp, fieldMapping, alt); + if (axisMapping != 128) + { + int controlRelation = tempOutControl % 2 == 0 ? tempOutControl - 1 : tempOutControl + 1; + outputfieldMapping.axisdirs[tempOutControl] = axisMapping; + outputfieldMapping.axisdirs[controlRelation] = axisMapping; + } + + //tempControlDict.Add(dcs.control, tempDS4Control); + } + else if (xboxControl >= X360Controls.LB && xboxControl <= X360Controls.Start) + { + DS4Controls tempDS4Control = reverseX360ButtonMapping[(int)xboxControl]; + int controlNum = (int)dcs.control; + if (xboxControl == X360Controls.LT || xboxControl == X360Controls.RT) + { + byte axisMapping = getByteMapping2(device, dcs.control, cState, eState, tp, outputfieldMapping); + if (axisMapping != 0) + outputfieldMapping.triggers[(int)tempDS4Control] = axisMapping; + } + else + { + bool value = getBoolMapping2(device, dcs.control, cState, eState, tp, outputfieldMapping); + outputfieldMapping.buttons[(int)tempDS4Control] = value; + } } else if (xboxControl >= X360Controls.LeftMouse && xboxControl <= X360Controls.WDOWN) { @@ -1475,7 +1503,6 @@ namespace DS4Windows { if (getBoolActionMapping2(device, dcs.control, cState, eState, tp, fieldMapping)) { - resetToDefaultValue2(dcs.control, MappedState, outputfieldMapping); if (!pressedonce[keyvalue]) { deviceState.currentClicks.toggle = !deviceState.currentClicks.toggle; @@ -1526,174 +1553,6 @@ namespace DS4Windows if (macroControl[24]) MappedState.RY = 0; } - if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.LXNeg), device, cState, eState, tp, fieldMapping), DS4Controls.LXNeg)) - tempControlDict[DS4Controls.LXNeg] = DS4Controls.LXNeg; - - if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.LXPos), device, cState, eState, tp, fieldMapping), DS4Controls.LXPos)) - tempControlDict[DS4Controls.LXPos] = DS4Controls.LXPos; - - if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.LYNeg), device, cState, eState, tp, fieldMapping), DS4Controls.LYNeg)) - tempControlDict[DS4Controls.LYNeg] = DS4Controls.LYNeg; - - if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.LYPos), device, cState, eState, tp, fieldMapping), DS4Controls.LYPos)) - tempControlDict[DS4Controls.LYPos] = DS4Controls.LYPos; - - if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.RXNeg), device, cState, eState, tp, fieldMapping), DS4Controls.RXNeg)) - tempControlDict[DS4Controls.RXNeg] = DS4Controls.RXNeg; - - if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.RXPos), device, cState, eState, tp, fieldMapping), DS4Controls.RXPos)) - tempControlDict[DS4Controls.RXPos] = DS4Controls.RXPos; - - if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.RYNeg), device, cState, eState, tp, fieldMapping), DS4Controls.RYNeg)) - tempControlDict[DS4Controls.RYNeg] = DS4Controls.RYNeg; - - if (IfAxisIsNotModified(device, ShiftTrigger2(GetDS4STrigger(device, DS4Controls.RYPos), device, cState, eState, tp, fieldMapping), DS4Controls.RYPos)) - tempControlDict[DS4Controls.RYPos] = DS4Controls.RYPos; - - Dictionary.KeyCollection controlKeys = tempControlDict.Keys; - //Dictionary>.KeyCollection controlKeys = tempControlDict.Keys; - - //foreach (KeyValuePair entry in tempControlDict) - for (int i = 0, keyCount = controlKeys.Count; i < keyCount; i++) - { - DS4Controls key = controlKeys.ElementAt(i); - DS4Controls dc = tempControlDict[key]; - //DS4Controls key = entry.Key; - //DS4Controls dc = entry.Value; - - if (getBoolActionMapping2(device, key, cState, eState, tp, fieldMapping, true)) - { - if (dc >= DS4Controls.Square && dc <= DS4Controls.Cross) - { - switch (dc) - { - case DS4Controls.Cross: MappedState.Cross = true; break; - case DS4Controls.Circle: MappedState.Circle = true; break; - case DS4Controls.Square: MappedState.Square = true; break; - case DS4Controls.Triangle: MappedState.Triangle = true; break; - default: break; - } - } - else if (dc >= DS4Controls.L1 && dc <= DS4Controls.R3) - { - switch (dc) - { - case DS4Controls.L1: MappedState.L1 = true; break; - case DS4Controls.L2: MappedState.L2 = getByteMapping2(device, key, cState, eState, tp, fieldMapping); break; - case DS4Controls.L3: MappedState.L3 = true; break; - case DS4Controls.R1: MappedState.R1 = true; break; - case DS4Controls.R2: MappedState.R2 = getByteMapping2(device, key, cState, eState, tp, fieldMapping); break; - case DS4Controls.R3: MappedState.R3 = true; break; - default: break; - } - } - else if (dc >= DS4Controls.DpadUp && dc <= DS4Controls.DpadLeft) - { - switch (dc) - { - case DS4Controls.DpadUp: MappedState.DpadUp = true; break; - case DS4Controls.DpadRight: MappedState.DpadRight = true; break; - case DS4Controls.DpadLeft: MappedState.DpadLeft = true; break; - case DS4Controls.DpadDown: MappedState.DpadDown = true; break; - default: break; - } - } - else if (dc >= DS4Controls.LXNeg && dc <= DS4Controls.RYPos) - { - switch (dc) - { - case DS4Controls.LXNeg: - case DS4Controls.LXPos: - { - if (MappedState.LX == 128) - { - if (dc == DS4Controls.LXNeg) - { - byte axisMapping = getXYAxisMapping2(device, key, cState, eState, tp, fieldMapping); - MappedState.LX = axisMapping; - } - else - { - byte axisMapping = getXYAxisMapping2(device, key, cState, eState, tp, fieldMapping, true); - MappedState.LX = axisMapping; - } - } - - break; - } - case DS4Controls.LYNeg: - case DS4Controls.LYPos: - { - if (MappedState.LY == 128) - { - if (dc == DS4Controls.LYNeg) - { - byte axisMapping = getXYAxisMapping2(device, key, cState, eState, tp, fieldMapping); - MappedState.LY = axisMapping; - } - else - { - byte axisMapping = getXYAxisMapping2(device, key, cState, eState, tp, fieldMapping, true); - MappedState.LY = axisMapping; - } - } - - break; - } - case DS4Controls.RXNeg: - case DS4Controls.RXPos: - { - if (MappedState.RX == 128) - { - if (dc == DS4Controls.RXNeg) - { - byte axisMapping = getXYAxisMapping2(device, key, cState, eState, tp, fieldMapping); - MappedState.RX = axisMapping; - } - else - { - byte axisMapping = getXYAxisMapping2(device, key, cState, eState, tp, fieldMapping, true); - MappedState.RX = axisMapping; - } - } - - break; - } - case DS4Controls.RYNeg: - case DS4Controls.RYPos: - { - if (MappedState.RY == 128) - { - if (dc == DS4Controls.RYNeg) - { - byte axisMapping = getXYAxisMapping2(device, key, cState, eState, tp, fieldMapping); - MappedState.RY = axisMapping; - } - else - { - byte axisMapping = getXYAxisMapping2(device, key, cState, eState, tp, fieldMapping, true); - MappedState.RY = axisMapping; - } - } - - break; - } - default: break; - } - } - else - { - switch (dc) - { - case DS4Controls.Options: MappedState.Options = true; break; - case DS4Controls.Share: MappedState.Share = true; break; - case DS4Controls.PS: MappedState.PS = true; break; - default: break; - } - } - } - } - calculateFinalMouseMovement(ref tempMouseDeltaX, ref tempMouseDeltaY, out mouseDeltaX, out mouseDeltaY); if (mouseDeltaX != 0 || mouseDeltaY != 0) From 09103dcea8861f2424c869974aeaf8878fbeebfa Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 1 Feb 2019 05:08:53 -0600 Subject: [PATCH 24/54] Use input field mapping instead of output field mapping for refactor --- DS4Windows/DS4Control/Mapping.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index c78a7fa..7b4f893 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1368,13 +1368,13 @@ namespace DS4Windows int controlNum = (int)dcs.control; if (xboxControl == X360Controls.LT || xboxControl == X360Controls.RT) { - byte axisMapping = getByteMapping2(device, dcs.control, cState, eState, tp, outputfieldMapping); + byte axisMapping = getByteMapping2(device, dcs.control, cState, eState, tp, fieldMapping); if (axisMapping != 0) outputfieldMapping.triggers[(int)tempDS4Control] = axisMapping; } else { - bool value = getBoolMapping2(device, dcs.control, cState, eState, tp, outputfieldMapping); + bool value = getBoolMapping2(device, dcs.control, cState, eState, tp, fieldMapping); outputfieldMapping.buttons[(int)tempDS4Control] = value; } } From ce87d8c212f794b1383a9dfabeae4ff2ca49f1fc Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 6 Feb 2019 21:42:34 -0600 Subject: [PATCH 25/54] Added toggle option for Gyro Mouse activation Not sure about this feature tbh. Related to issue #464. --- DS4Windows/DS4Control/Mouse.cs | 25 + DS4Windows/DS4Control/ScpUtil.cs | 21 + DS4Windows/DS4Forms/Options.Designer.cs | 10 + DS4Windows/DS4Forms/Options.cs | 16 + DS4Windows/DS4Forms/Options.resx | 4224 ++++------------------- 5 files changed, 801 insertions(+), 3495 deletions(-) diff --git a/DS4Windows/DS4Control/Mouse.cs b/DS4Windows/DS4Control/Mouse.cs index 7faaa72..cfba098 100644 --- a/DS4Windows/DS4Control/Mouse.cs +++ b/DS4Windows/DS4Control/Mouse.cs @@ -58,8 +58,18 @@ namespace DS4Windows trackballAccel = TRACKBALL_RADIUS * friction / TRACKBALL_INERTIA; } + public void ResetToggleGyroM() + { + currentToggleGyroM = false; + } + bool triggeractivated = false; + bool previousTriggerActivated = false; bool useReverseRatchet = false; + bool toggleGyroMouse = true; + public bool ToggleGyroMouse { get => toggleGyroMouse; + set { toggleGyroMouse = value; ResetToggleGyroM(); } } + bool currentToggleGyroM = false; public virtual void sixaxisMoved(object sender, SixAxisEventArgs arg) { @@ -91,6 +101,21 @@ namespace DS4Windows } } + if (toggleGyroMouse) + { + if (triggeractivated && triggeractivated != previousTriggerActivated) + { + currentToggleGyroM = !currentToggleGyroM; + } + + previousTriggerActivated = triggeractivated; + triggeractivated = currentToggleGyroM; + } + else + { + previousTriggerActivated = triggeractivated; + } + if (useReverseRatchet && triggeractivated) cursor.sixaxisMoved(arg); else if (!useReverseRatchet && !triggeractivated) diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 3430e23..3716c4a 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -789,6 +789,10 @@ namespace DS4Windows m_Config.SetGyroMouseDZ(index, value, control); } + public static bool[] GyroMouseToggle => m_Config.gyroMouseToggle; + public static void SetGyroMouseToggle(int index, bool value, ControlService control) + => m_Config.SetGyroMouseToggle(index, value, control); + public static DS4Color[] MainColor => m_Config.m_Leds; public static DS4Color getMainColor(int index) { @@ -1451,6 +1455,8 @@ namespace DS4Windows public int[] gyroMouseDZ = new int[5] { MouseCursor.GYRO_MOUSE_DEADZONE, MouseCursor.GYRO_MOUSE_DEADZONE, MouseCursor.GYRO_MOUSE_DEADZONE, MouseCursor.GYRO_MOUSE_DEADZONE, MouseCursor.GYRO_MOUSE_DEADZONE }; + public bool[] gyroMouseToggle = new bool[5] { false, false, false, + false, false }; public int[] lsOutCurveMode = new int[5] { 0, 0, 0, 0, 0 }; public int[] rsOutCurveMode = new int[5] { 0, 0, 0, 0, 0 }; public int[] l2OutCurveMode = new int[5] { 0, 0, 0, 0, 0 }; @@ -1677,6 +1683,13 @@ namespace DS4Windows control.touchPad[index].CursorGyroDead = value; } + public void SetGyroMouseToggle(int index, bool value, ControlService control) + { + gyroMouseToggle[index] = value; + if (index < 4 && control.touchPad[index] != null) + control.touchPad[index].ToggleGyroMouse = value; + } + public bool SaveProfile(int device, string propath) { bool Saved = true; @@ -1779,6 +1792,7 @@ namespace DS4Windows XmlNode xmlGyroSmoothing = m_Xdoc.CreateNode(XmlNodeType.Element, "GyroSmoothing", null); xmlGyroSmoothing.InnerText = gyroSmoothing[device].ToString(); Node.AppendChild(xmlGyroSmoothing); 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 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); @@ -2682,6 +2696,13 @@ namespace DS4Windows SetGyroMouseDZ(device, temp, control); } catch { SetGyroMouseDZ(device, MouseCursor.GYRO_MOUSE_DEADZONE, control); missingSetting = true; } + try + { + Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseToggle"); bool.TryParse(Item.InnerText, out bool temp); + SetGyroMouseToggle(device, temp, control); + } + catch { SetGyroMouseToggle(device, false, control); missingSetting = true; } + try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/LSCurve"); int.TryParse(Item.InnerText, out lsCurve[device]); } catch { lsCurve[device] = 0; missingSetting = true; } diff --git a/DS4Windows/DS4Forms/Options.Designer.cs b/DS4Windows/DS4Forms/Options.Designer.cs index ecd459a..abb5e16 100644 --- a/DS4Windows/DS4Forms/Options.Designer.cs +++ b/DS4Windows/DS4Forms/Options.Designer.cs @@ -315,6 +315,7 @@ this.rBSAControls = new System.Windows.Forms.RadioButton(); this.rBSAMouse = new System.Windows.Forms.RadioButton(); this.pnlSAMouse = new System.Windows.Forms.Panel(); + this.toggleGyroMCb = new System.Windows.Forms.CheckBox(); this.label27 = new System.Windows.Forms.Label(); this.gyroMouseDzNUD = new System.Windows.Forms.NumericUpDown(); this.label26 = new System.Windows.Forms.Label(); @@ -3395,6 +3396,7 @@ // // pnlSAMouse // + this.pnlSAMouse.Controls.Add(this.toggleGyroMCb); this.pnlSAMouse.Controls.Add(this.label27); this.pnlSAMouse.Controls.Add(this.gyroMouseDzNUD); this.pnlSAMouse.Controls.Add(this.label26); @@ -3419,6 +3421,13 @@ resources.ApplyResources(this.pnlSAMouse, "pnlSAMouse"); this.pnlSAMouse.Name = "pnlSAMouse"; // + // toggleGyroMCb + // + resources.ApplyResources(this.toggleGyroMCb, "toggleGyroMCb"); + this.toggleGyroMCb.Name = "toggleGyroMCb"; + this.toggleGyroMCb.UseVisualStyleBackColor = true; + this.toggleGyroMCb.Click += new System.EventHandler(this.toggleGyroMCb_Click); + // // label27 // resources.ApplyResources(this.label27, "label27"); @@ -4644,5 +4653,6 @@ private System.Windows.Forms.ComboBox triggerCondAndCombo; private System.Windows.Forms.Label label27; private System.Windows.Forms.NumericUpDown gyroMouseDzNUD; + private System.Windows.Forms.CheckBox toggleGyroMCb; } } \ No newline at end of file diff --git a/DS4Windows/DS4Forms/Options.cs b/DS4Windows/DS4Forms/Options.cs index 368dfff..1ca64cc 100644 --- a/DS4Windows/DS4Forms/Options.cs +++ b/DS4Windows/DS4Forms/Options.cs @@ -719,6 +719,7 @@ namespace DS4Windows cBGyroMouseXAxis.SelectedIndex = GyroMouseHorizontalAxis[device]; triggerCondAndCombo.SelectedIndex = SATriggerCond[device] ? 0 : 1; gyroMouseDzNUD.Value = GyroMouseDeadZone[device]; + toggleGyroMCb.Checked = GyroMouseToggle[device]; } else { @@ -836,6 +837,7 @@ namespace DS4Windows cBGyroSmooth.Checked = false; nUDGyroSmoothWeight.Value = 0.5m; gyroMouseDzNUD.Value = MouseCursor.GYRO_MOUSE_DEADZONE; + toggleGyroMCb.Checked = false; cBGyroMouseXAxis.SelectedIndex = 0; triggerCondAndCombo.SelectedIndex = 0; Set(); @@ -1337,6 +1339,7 @@ namespace DS4Windows GyroSmoothingWeight[device] = (double)nUDGyroSmoothWeight.Value; GyroMouseHorizontalAxis[device] = cBGyroMouseXAxis.SelectedIndex; SetGyroMouseDeadZone(device, (int)gyroMouseDzNUD.Value, Program.rootHub); + SetGyroMouseToggle(device, toggleGyroMCb.Checked, Program.rootHub); int invert = 0; if (cBGyroInvertX.Checked) @@ -2817,6 +2820,8 @@ namespace DS4Windows if (!loading) { GyroTriggerTurns[device] = gyroTriggerBehavior.Checked; + if (device < 4) + Program.rootHub.touchPad[device]?.ResetToggleGyroM(); } } @@ -3001,6 +3006,17 @@ namespace DS4Windows } } + private void toggleGyroMCb_Click(object sender, EventArgs e) + { + if (loading == false) + { + if (device < 4) + { + SetGyroMouseToggle(device, toggleGyroMCb.Checked, Program.rootHub); + } + } + } + private void trackFrictionNUD_ValueChanged(object sender, EventArgs e) { if (loading == false) diff --git a/DS4Windows/DS4Forms/Options.resx b/DS4Windows/DS4Forms/Options.resx index 6826eb5..6663aff 100644 --- a/DS4Windows/DS4Forms/Options.resx +++ b/DS4Windows/DS4Forms/Options.resx @@ -1335,198 +1335,6 @@ 1 - - pnlTPMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 0 - - - rBTPControls - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 1 - - - rBTPMouse - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 2 - - - fLPTouchSwipe - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 3 - - - 2, 259 - - - 270, 190 - - - 246 - - - Touchpad - - - gBTouchpad - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 1 - - - trackFrictionLb - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlTPMouse - - - 0 - - - trackFrictionNUD - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlTPMouse - - - 1 - - - trackballCk - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlTPMouse - - - 2 - - - touchpadDisInvertButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlTPMouse - - - 3 - - - label25 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlTPMouse - - - 4 - - - label15 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlTPMouse - - - 5 - - - touchpadInvertComboBox - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlTPMouse - - - 6 - - - cbStartTouchpadOff - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlTPMouse - - - 16 - - - 0, 36 - - - 2, 2, 2, 2 - - - 266, 149 - - - 257 - - - pnlTPMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 0 - True @@ -1758,6 +1566,30 @@ 16 + + 0, 36 + + + 2, 2, 2, 2 + + + 266, 149 + + + 257 + + + pnlTPMouse + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gBTouchpad + + + 0 + True @@ -1824,126 +1656,156 @@ 2 - - bnSwipeUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 0 - - - lbSwipeUp - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 1 - - - bnSwipeDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 2 - - - lbSwipeDown - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 3 - - - bnSwipeLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 4 - - - lbSwipeLeft - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 5 - - - bnSwipeRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 6 - - - lbSwipeRight - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTouchSwipe - - - 7 - - - 6, 40 - - - 260, 148 - - - 256 - - - fLPTouchSwipe - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBTouchpad - - - 3 - 326, 13 + + False + + + 117, 22 + + + Control + + + 114, 6 + + + 117, 22 + + + Default + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Dpad + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Left Stick + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Right Stick + + + 117, 22 + + + Face Buttons + + + 147, 22 + + + w/ Scan Code + + + False + + + 117, 22 + + + WASD + + + 147, 22 + + + w/ Scan Code + + + 117, 22 + + + Arrow Keys + + + 127, 22 + + + Inverted + + + 127, 22 + + + Inverted X + + + 127, 22 + + + Inverted Y + + + 117, 22 + + + Mouse + 118, 208 @@ -1983,153 +1845,6 @@ 0 - - False - - - 117, 22 - - - Control - - - 114, 6 - - - 117, 22 - - - Default - - - 117, 22 - - - Dpad - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Left Stick - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Right Stick - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - - - 117, 22 - - - Face Buttons - - - False - - - 117, 22 - - - WASD - - - 147, 22 - - - w/ Scan Code - - - 117, 22 - - - Arrow Keys - - - 147, 22 - - - w/ Scan Code - - - 117, 22 - - - Mouse - - - 127, 22 - - - Inverted - - - 127, 22 - - - Inverted X - - - 127, 22 - - - Inverted Y - NoControl @@ -2352,173 +2067,50 @@ 7 - - btPollRateLabel + + 6, 40 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 260, 148 - - gBOther + + 256 - - 0 + + fLPTouchSwipe - - btPollRateComboBox + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + gBTouchpad - - gBOther - - - 1 - - - enableTouchToggleCheckbox - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 2 - - - cBDinput - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - + 3 - - pBProgram + + 2, 259 - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 270, 190 - - gBOther + + 246 - - 4 + + Touchpad - - cBLaunchProgram + + gBTouchpad - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 5 - - - btnBrowse - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 6 - - - lbUseController - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 7 - - - cBMouseAccel - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 8 - - - nUDSixaxis - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 9 - - - cBControllerInput - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 10 - - - cBIdleDisconnect - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBOther - - - 12 - - - 281, 221 - - - 272, 256 - - - 247 - - - Other - - - gBOther - - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - fLPSettings + + tPControls - - 5 + + 1 True @@ -2932,149 +2524,29 @@ with profile 12 - - btnRainbow + + 281, 221 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 272, 256 - - gBLightbar - - - 0 - - - lbRainbowB - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 1 - - - nUDRainbowB - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 2 - - - cBFlashType - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 3 - - - cBWhileCharging - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 4 - - - btnFlashColor - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 5 - - - btnChargingColor - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 6 - - - lbWhileCharging - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 7 - - - lbPercentFlashBar - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 8 - - - nUDflashLED - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBLightbar - - - 9 - - - 3, 3 - - - 272, 233 - - + 247 - - Lightbar + + Other - - gBLightbar + + gBOther - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + fLPSettings - - 0 + + 5 NoControl @@ -3361,53 +2833,29 @@ with profile 9 - - lbPercentRumble + + 3, 3 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 272, 233 - - gBRumble - - - 0 - - - btnRumbleLightTest - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBRumble - - - 1 - - - 281, 3 - - - 272, 46 - - + 247 - - Rumble + + Lightbar - - gBRumble + + gBLightbar - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + fLPSettings - - 2 + + 0 True @@ -3466,6 +2914,30 @@ with profile 1 + + 281, 3 + + + 272, 46 + + + 247 + + + Rumble + + + gBRumble + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 2 + True @@ -3574,225 +3046,6 @@ with profile 153, 17 - - pnlSATrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 0 - - - lbL2Track - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 1 - - - lbRSTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 2 - - - lbInputDelay - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 3 - - - lbR2Track - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 4 - - - lbLSTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 5 - - - lbSATip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 6 - - - tBR2 - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 7 - - - tBL2 - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 8 - - - pnlSixaxis - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 9 - - - pnlLSTrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 10 - - - pnlRSTrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 11 - - - 4, 22 - - - 3, 3, 3, 3 - - - 438, 455 - - - 2 - - - Controller Readings - - - lbL2TrackS - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCControls - - - 2 - - - btnSATrack - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSATrack - - - 0 - - - btnSATrackS - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSATrack - - - 1 - - - 300, 88 - - - 2, 2, 2, 2 - - - 125, 125 - - - 252 - - - pnlSATrack - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 0 - False @@ -3856,6 +3109,30 @@ with profile 1 + + 300, 88 + + + 2, 2, 2, 2 + + + 125, 125 + + + 252 + + + pnlSATrack + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + lbL2TrackS + + + 0 + True @@ -4120,123 +3397,6 @@ with profile 8 - - tBsixaxisAccelX - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 0 - - - lb6Accel - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 1 - - - tBsixaxisGyroX - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 2 - - - lb6Gryo - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 3 - - - tBsixaxisGyroY - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 4 - - - tBsixaxisGyroZ - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 5 - - - tBsixaxisAccelY - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 6 - - - tBsixaxisAccelZ - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSixaxis - - - 7 - - - 300, 233 - - - 125, 125 - - - 236 - - - pnlSixaxis - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - lbL2TrackS - - - 9 - False @@ -4459,53 +3619,26 @@ with profile 7 - - btnLSTrack + + 300, 233 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlLSTrack - - - 0 - - - btnLSTrackS - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlLSTrack - - - 1 - - - 5, 88 - - - 2, 2, 2, 2 - - + 125, 125 - - 250 + + 236 - - pnlLSTrack + + pnlSixaxis - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + lbL2TrackS - - 10 + + 9 False @@ -4570,53 +3703,29 @@ with profile 1 - - btnRSTrackS + + 5, 88 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlRSTrack - - - 0 - - - btnRSTrack - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlRSTrack - - - 1 - - - 151, 88 - - + 2, 2, 2, 2 - + 125, 125 - - 251 + + 250 - - pnlRSTrack + + pnlLSTrack - + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + lbL2TrackS - - 11 + + 10 False @@ -4681,122 +3790,56 @@ with profile 1 - - bnGyroZN + + 151, 88 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 2, 2, 2 - - fLPTiltControls + + 125, 125 - - 0 + + 251 - - lbGyroZN + + pnlRSTrack - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - fLPTiltControls + + lbL2TrackS - - 1 + + 11 - - bnGyroZP + + 4, 22 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 3, 3, 3, 3 - - fLPTiltControls + + 438, 485 - + 2 - - lbGyroZP + + Controller Readings - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + lbL2TrackS - - fLPTiltControls + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + tCControls - - bnGyroXP - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTiltControls - - - 4 - - - lbGyroXP - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTiltControls - - - 5 - - - bnGyroXN - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTiltControls - - - 6 - - - lbGyroXN - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPTiltControls - - - 7 - - - 4, 43 - - - 271, 167 - - - 254 - - - fLPTiltControls - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 3 + + 2 NoControl @@ -5014,120 +4057,30 @@ with profile 7 - - tPControls + + 4, 43 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 271, 203 - - tCControls + + 254 - - 0 + + fLPTiltControls - - tPSpecial + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + gBGyro - - tCControls - - - 1 - - - Left - - - 0, 0 - - - 446, 511 - - - 253 - - - tCControls - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 + + 3 True - - lBControls - - - System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 0 - - - lbControlTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 2 - - - pnlController - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 3 - - - 4, 22 - - - 3, 3, 3, 3 - - - 438, 485 - - - 0 - - - Controls - - - tPControls - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCControls - - - 0 - Top, Bottom, Left @@ -5287,654 +4240,6 @@ with profile Zoom - - pBHoveredButton - - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 0 - - - lbLRS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 1 - - - lbLLS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 2 - - - bnRSDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 3 - - - lbLTouchUpper - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 4 - - - lbLTouchRight - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 5 - - - bnL3 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 6 - - - lbLTouchLM - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 7 - - - bnRSUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 8 - - - lbLR2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 9 - - - bnRSRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 10 - - - lbLL2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 11 - - - bnR3 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 12 - - - lbLR1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 13 - - - bnRSLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 14 - - - lbLL1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 15 - - - bnLSLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 16 - - - lbLPS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 17 - - - bnLSUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 18 - - - lbLLeft - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 19 - - - bnLSRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 20 - - - lbLright - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 21 - - - bnLSDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 22 - - - lbLDown - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 23 - - - bnR2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 24 - - - bnUp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 25 - - - bnDown - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 26 - - - bnTriangle - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 27 - - - bnR1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 28 - - - bnSquare - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 29 - - - bnRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 30 - - - lbLUp - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 31 - - - bnLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 32 - - - lbLShare - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 33 - - - bnOptions - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 34 - - - bnShare - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 35 - - - lbLOptions - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 36 - - - bnL1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 37 - - - bnTouchRight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 38 - - - bnL2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 39 - - - lbLTriangle - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 40 - - - bnTouchLeft - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 41 - - - lbLSquare - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 42 - - - bnTouchMulti - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 43 - - - lbLCircle - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 44 - - - lbLCross - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 45 - - - bnTouchUpper - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 46 - - - btnLightbar - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 47 - - - bnPS - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 48 - - - bnCross - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 49 - - - bnCircle - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 50 - - - lbControlName - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlController - - - 51 - - - 2, 2 - - - 2, 2, 2, 2 - - - 422, 230 - - - 282 - - - pnlController - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPControls - - - 3 - False @@ -7585,112 +5890,55 @@ with profile 51 - - pnlActions + + 2, 2 - + + 2, 2, 2, 2 + + + 422, 230 + + + 282 + + + pnlController + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tPSpecial + + tPControls - - 0 - - - 4, 22 - - - 438, 455 - - + 3 - - Special Actions + + 4, 22 - - tPSpecial + + 3, 3, 3, 3 - + + 438, 485 + + + 0 + + + Controls + + + tPControls + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tCControls - - 1 - - - lVActions - - - System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlActions - - - 0 - - - panel2 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlActions - - - 1 - - - Fill - - - 0, 0 - - - 438, 455 - - - 15 - - - pnlActions - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPSpecial - - - 0 - - - Fill - - - 0, 66 - - - 438, 389 - - - 13 - - - lVActions - - - System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlActions - - + 0 @@ -7711,115 +5959,28 @@ with profile 100 - - fLPActionButtons - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 0 - - - lbActionsTip - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 1 - - - Top - - - 0, 0 - - - 2, 2, 2, 2 - - - 438, 66 - - - 16 - - - panel2 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlActions - - - 1 - - - btnNewAction - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPActionButtons - - - 0 - - - btnEditAction - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPActionButtons - - - 1 - - - btnRemAction - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPActionButtons - - - 2 - - + Fill - - 0, 28 + + 0, 66 - - 438, 38 + + 438, 419 - - 15 + + 13 - - fLPActionButtons + + lVActions - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - panel2 + + pnlActions - + 0 @@ -7903,6 +6064,30 @@ with profile 2 + + Fill + + + 0, 28 + + + 438, 38 + + + 15 + + + fLPActionButtons + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel2 + + + 0 + Top @@ -7936,98 +6121,104 @@ with profile 1 - - tPDeadzone + + Top - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0, 0 - - tCSens + + 2, 2, 2, 2 - - 0 + + 438, 66 - - antiDeadzoneTabPage + + 16 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + panel2 - - tCSens + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + pnlActions + + 1 - - maxZoneTabPage + + Fill - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0, 0 - - tCSens + + 438, 485 - - 2 + + 15 - - tPOutCurve + + pnlActions - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tCSens + + tPSpecial - + + 0 + + + 4, 22 + + + 438, 485 + + 3 - - tPCurve + + Special Actions - + + tPSpecial + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tCSens + + tCControls - - 4 + + 1 - - tpRotation + + Left - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0, 0 - - tCSens + + 446, 511 - - 5 + + 253 - - 281, 55 + + tCControls - - 272, 78 - - - 234 - - - tCSens - - + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - fLPSettings + + $this - - 3 + + 4 4, 22 @@ -8056,177 +6247,6 @@ with profile 0 - - nUDSixaxisZAntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 0 - - - nUDSixaxisXAntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 1 - - - label20 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 2 - - - label19 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 3 - - - nUDR2AntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 4 - - - label3 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 5 - - - nUDL2AntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 6 - - - label4 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 7 - - - nUDRSAntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 8 - - - label2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 9 - - - nUDLSAntiDead - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 10 - - - label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - antiDeadzoneTabPage - - - 11 - - - 4, 22 - - - 3, 3, 3, 3 - - - 264, 52 - - - 2 - - - Anti-Deadzone - - - antiDeadzoneTabPage - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tCSens - - - 1 - 214, 29 @@ -8533,176 +6553,32 @@ with profile 11 - - nUDSixAxisZMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 0 - - - nUDSixAxisXMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 1 - - - label18 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 2 - - - label17 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 3 - - - nUDR2Maxzone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 4 - - - nUDL2Maxzone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 5 - - - label8 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 6 - - - label7 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 7 - - - nUDRSMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 8 - - - label6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 9 - - - nUDLSMaxZone - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 10 - - - label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - maxZoneTabPage - - - 11 - - + 4, 22 - + 3, 3, 3, 3 - + 264, 52 - - 3 + + 2 - - Max Zone + + Anti-Deadzone - - maxZoneTabPage + + antiDeadzoneTabPage - + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tCSens - - 2 + + 1 220, 29 @@ -9010,173 +6886,32 @@ with profile 11 - - cBSixaxisZOutputCurve - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 0 - - - cBSixaxisXOutputCurve - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 1 - - - label24 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 2 - - - label23 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 3 - - - cBR2OutputCurve - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 4 - - - cBL2OutputCurve - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 5 - - - label22 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 6 - - - label21 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 7 - - - rsOutCurveComboBox - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 8 - - - lsOutCurveComboBox - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 9 - - - label10 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 10 - - - label9 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPOutCurve - - - 11 - - + 4, 22 - + + 3, 3, 3, 3 + + 264, 52 - - 4 + + 3 - - Output Curve + + Max Zone - - tPOutCurve + + maxZoneTabPage - + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tCSens - - 3 + + 2 Linear @@ -9562,104 +7297,29 @@ with profile 11 - - nUDLSCurve - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 0 - - - nUDRSCurve - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 1 - - - lbRSCurve - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 2 - - - lbRSCurvePercent - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 3 - - - lbLSCurvePercent - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 4 - - - lbLSCurve - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tPCurve - - - 5 - - + 4, 22 - - 3, 3, 3, 3 - - + 264, 52 - - 1 + + 4 - - Curve (Input) + + Output Curve - - tPCurve + + tPOutCurve - + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tCSens - - 4 + + 3 36, 16 @@ -9829,80 +7489,32 @@ with profile 5 - - nUDRSRotation - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 0 - - - label14 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 1 - - - nUDLSRotation - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 2 - - - label13 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tpRotation - - - 3 - - + 4, 22 - + 3, 3, 3, 3 - + 264, 52 - - 5 + + 1 - - Rotation + + Curve (Input) - - tpRotation + + tPCurve - + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tCSens - - 5 + + 4 160, 21 @@ -10006,122 +7618,56 @@ with profile 3 - - True + + 4, 22 - - gBGyro + + 3, 3, 3, 3 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 264, 52 - + + 5 + + + Rotation + + + tpRotation + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tCSens + + + 5 + + + 281, 55 + + + 272, 78 + + + 234 + + + tCSens + + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + fLPSettings - - 1 - - - gBSensitivity - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 4 - - - Fill - - - TopDown - - - 446, 0 - - - 2, 2, 2, 2 - - - 565, 511 - - - 254 - - - fLPSettings - - - System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - + 3 - - rBSAControls - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 0 - - - rBSAMouse - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 1 - - - pnlSAMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 2 - - - 3, 242 - - - 272, 224 - - - 248 - - - Gyro - - - gBGyro - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fLPSettings - - - 1 + + True True @@ -10189,287 +7735,41 @@ with profile 1 - - label27 + + True - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 9, 187 - + + Yes + + + 59, 17 + + + 276 + + + Toggle + + + toggleGyroMCb + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + pnlSAMouse - + 0 - - gyroMouseDzNUD - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 1 - - - label26 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 2 - - - triggerCondAndCombo - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 3 - - - cBGyroMouseXAxis - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 4 - - - label16 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 5 - - - lbGyroSmooth - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 6 - - - cBGyroSmooth - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 7 - - - lbSmoothWeight - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 8 - - - nUDGyroSmoothWeight - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 9 - - - label12 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 10 - - - nUDGyroMouseVertScale - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 11 - - - label11 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 12 - - - gyroTriggerBehavior - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 13 - - - cBGyroInvertY - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 14 - - - cBGyroInvertX - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 15 - - - lbGyroInvert - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 16 - - - lbGyroTriggers - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 17 - - - btnGyroTriggers - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 18 - - - nUDGyroSensitivity - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 19 - - - lbGyroSens - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSAMouse - - - 20 - - - 6, 39 - - - 2, 2, 2, 2 - - - 263, 181 - - - 259 - - - pnlSAMouse - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBGyro - - - 2 - True - 6, 158 + 11, 166 56, 13 @@ -10490,10 +7790,10 @@ with profile pnlSAMouse - 0 + 1 - 94, 156 + 78, 166 43, 20 @@ -10511,7 +7811,7 @@ with profile pnlSAMouse - 1 + 2 True @@ -10541,7 +7841,7 @@ with profile pnlSAMouse - 2 + 3 And @@ -10568,7 +7868,7 @@ with profile pnlSAMouse - 3 + 4 Yaw @@ -10595,7 +7895,7 @@ with profile pnlSAMouse - 4 + 5 True @@ -10625,7 +7925,7 @@ with profile pnlSAMouse - 5 + 6 True @@ -10655,7 +7955,7 @@ with profile pnlSAMouse - 6 + 7 True @@ -10685,7 +7985,7 @@ with profile pnlSAMouse - 7 + 8 True @@ -10715,7 +8015,7 @@ with profile pnlSAMouse - 8 + 9 False @@ -10739,7 +8039,7 @@ with profile pnlSAMouse - 9 + 10 True @@ -10769,7 +8069,7 @@ with profile pnlSAMouse - 10 + 11 95, 89 @@ -10790,7 +8090,7 @@ with profile pnlSAMouse - 11 + 12 True @@ -10820,7 +8120,7 @@ with profile pnlSAMouse - 12 + 13 True @@ -10853,7 +8153,7 @@ with profile pnlSAMouse - 13 + 14 True @@ -10886,7 +8186,7 @@ with profile pnlSAMouse - 14 + 15 True @@ -10919,7 +8219,7 @@ with profile pnlSAMouse - 15 + 16 True @@ -10952,7 +8252,7 @@ with profile pnlSAMouse - 16 + 17 True @@ -10985,7 +8285,7 @@ with profile pnlSAMouse - 17 + 18 NoControl @@ -11015,7 +8315,7 @@ with profile pnlSAMouse - 18 + 19 96, 62 @@ -11036,7 +8336,7 @@ with profile pnlSAMouse - 19 + 20 True @@ -11069,175 +8369,55 @@ with profile pnlSAMouse - 20 + 21 - - lbL2S + + 6, 39 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 2, 2, 2 - - gBSensitivity + + 263, 207 - - 0 + + 259 - - nUDL2S + + pnlSAMouse - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - gBSensitivity + + gBGyro - - 1 - - - nUDLSS - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - + 2 - - lbSixaxisXS + + 3, 242 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 272, 257 - - gBSensitivity + + 248 - - 3 + + Gyro - - nUDR2S + + gBGyro - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 4 - - - lbSixaxisZS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 5 - - - nUDRSS - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 6 - - - lbR2LS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 7 - - - nUDSXS - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 8 - - - lbRSS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 9 - - - lbLSS - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 10 - - - nUDSZS - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gBSensitivity - - - 11 - - - 281, 139 - - - 272, 76 - - - 257 - - - Sensitivity - - - gBSensitivity - - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + fLPSettings - - 4 + + 1 True @@ -11557,18 +8737,63 @@ with profile 11 + + 281, 139 + + + 272, 76 + + + 257 + + + Sensitivity + + + gBSensitivity + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fLPSettings + + + 4 + + + Fill + + + TopDown + + + 446, 0 + + + 2, 2, 2, 2 + + + 565, 511 + + + 254 + + + fLPSettings + + + System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + 482, 17 - - 195, 444 - - - cMGyroTriggers - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 194, 22 @@ -11689,18 +8914,18 @@ with profile Always on + + 195, 444 + + + cMGyroTriggers + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 144, 63 - - 195, 422 - - - cMTouchDisableInvert - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 194, 22 @@ -11815,6 +9040,15 @@ with profile PS + + 195, 422 + + + cMTouchDisableInvert + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 647, 17 From 255fc8f8fc9ea3a6920e13751c68197d5e4f7f27 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 7 Feb 2019 11:52:28 -0600 Subject: [PATCH 26/54] Minor fix for update check when offline Related to issue #568 --- DS4Windows/DS4Forms/DS4Form.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index d89b20c..cd4f967 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -786,7 +786,7 @@ namespace DS4Windows FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); string version = fvi.FileVersion; string newversion = File.ReadAllText(appdatapath + "\\version.txt").Trim(); - if (version.Replace(',', '.').CompareTo(newversion) != 0) + if (!string.IsNullOrWhiteSpace(newversion) && version.Replace(',', '.').CompareTo(newversion) != 0) { if ((DialogResult)this.Invoke(new Func(() => { return MessageBox.Show(Properties.Resources.DownloadVersion.Replace("*number*", newversion), @@ -2097,7 +2097,7 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); string version2 = fvi.FileVersion; string newversion2 = File.ReadAllText(appdatapath + "\\version.txt").Trim(); - if (version2.Replace(',', '.').CompareTo(newversion2) != 0) + if (!string.IsNullOrWhiteSpace(newversion2) && version2.Replace(',', '.').CompareTo(newversion2) != 0) { if ((DialogResult)this.Invoke(new Func(() => { From 4d989bb5f0e41459a5f00c1b9645ecfcdf8c25da Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 7 Feb 2019 12:08:12 -0600 Subject: [PATCH 27/54] Added xrossb to contributors file --- contributors.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/contributors.txt b/contributors.txt index ad9e1d2..0514e44 100644 --- a/contributors.txt +++ b/contributors.txt @@ -4,4 +4,5 @@ jdfeng justalemon Rajko Stojadinovic (rajkosto) Yuki-nyan +xrossb From 3dd88e481c678e2ea4a1acca141e6a7ae3b5075a Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 7 Feb 2019 16:40:24 -0600 Subject: [PATCH 28/54] Fixed issue with xinput unplug routine on device removal Related to issue #554 --- DS4Windows/DS4Control/ScpUtil.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 3716c4a..a5a4073 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -2602,7 +2602,6 @@ namespace DS4Windows catch { dinputOnly[device] = false; missingSetting = true; } bool oldUseDInputOnly = Global.useDInputOnly[device]; - Global.useDInputOnly[device] = dinputOnly[device]; // Only change xinput devices under certain conditions. Avoid // performing this upon program startup before loading devices. @@ -2618,20 +2617,14 @@ namespace DS4Windows { if (dinputOnly[device] == true) { - Global.useDInputOnly[device] = true; xinputPlug = false; xinputStatus = true; } else if (synced && isAlive) { - Global.useDInputOnly[device] = false; xinputPlug = true; xinputStatus = true; } - else if (!synced) - { - Global.useDInputOnly[device] = true; - } } } } @@ -2995,12 +2988,12 @@ namespace DS4Windows int xinputIndex = control.x360Bus.FirstController + device; if (xinputResult) { - dinputOnly[device] = false; + Global.useDInputOnly[device] = false; AppLogger.LogToGui("X360 Controller # " + xinputIndex + " connected", false); } else { - dinputOnly[device] = true; + Global.useDInputOnly[device] = true; AppLogger.LogToGui("X360 Controller # " + xinputIndex + " failed. Using DInput only mode", true); } } @@ -3010,11 +3003,12 @@ namespace DS4Windows int xinputIndex = control.x360Bus.FirstController + device; if (xinputResult) { - dinputOnly[device] = true; + Global.useDInputOnly[device] = true; AppLogger.LogToGui("X360 Controller # " + xinputIndex + " unplugged", false); } else { + Global.useDInputOnly[device] = false; AppLogger.LogToGui("X360 Controller # " + xinputIndex + " failed to unplug", true); } } From 8c6cfa4c137ae921e775b8433c4988280c2c6f25 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 7 Feb 2019 21:00:36 -0600 Subject: [PATCH 29/54] Fixed another action getter --- DS4Windows/DS4Control/ScpUtil.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index a5a4073..4e2ee7a 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -3617,7 +3617,7 @@ namespace DS4Windows DS4ControlSettings dcs = ds4settings[deviceNum][index]; if (shift) { - return dcs.shiftTrigger; + return dcs.shiftAction; } else { From e64c7f0455ab3f60a51bccae90f376c0603b7ee5 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 7 Feb 2019 22:56:07 -0600 Subject: [PATCH 30/54] Fixed double tap interval issue with Multi-Action Button special action Related to issue #556 --- DS4Windows/DS4Control/Mapping.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 7b4f893..3db3eef 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1950,7 +1950,7 @@ namespace DS4Windows { // pressed down action.pastTime = DateTime.UtcNow; - if (action.pastTime <= (action.firstTap + TimeSpan.FromMilliseconds(100))) + if (action.pastTime <= (action.firstTap + TimeSpan.FromMilliseconds(150))) { action.tappedOnce = tappedOnce = false; action.secondtouchbegin = secondtouchbegin = true; From 925d2584c0874d92ab1d7f474d37b8601444f61f Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 8 Feb 2019 08:14:01 -0600 Subject: [PATCH 31/54] Updated newest.txt file --- DS4Windows/newest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/newest.txt b/DS4Windows/newest.txt index d8c5e72..15d45d4 100644 --- a/DS4Windows/newest.txt +++ b/DS4Windows/newest.txt @@ -1 +1 @@ -1.6.8 +1.6.9 From 1f0c144d42a144e1008fea203354ed1a46ad7c7d Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 8 Feb 2019 08:14:14 -0600 Subject: [PATCH 32/54] Version 1.6.9 --- DS4Windows/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index 1497a9d..15b3909 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.8")] -[assembly: AssemblyFileVersion("1.6.8")] +[assembly: AssemblyVersion("1.6.9")] +[assembly: AssemblyFileVersion("1.6.9")] [assembly: NeutralResourcesLanguage("en")] From 7818e88b72cfd94de053b28e5bf3d621918e794f Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 8 Feb 2019 11:26:42 -0600 Subject: [PATCH 33/54] Added dispose call when closing Options form --- DS4Windows/DS4Forms/DS4Form.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index cd4f967..ccdd743 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -1612,6 +1612,7 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question opt.Dock = DockStyle.None; tabProfiles.Controls.Remove(opt); + opt.Dispose(); optPop = false; opt = null; lBProfiles.Visible = true; From 34e3db6cea70d9e909efd80289aaac689962117a Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 8 Feb 2019 16:56:38 -0600 Subject: [PATCH 34/54] Undo last commit. Extra dispose call is not necessary --- DS4Windows/DS4Forms/DS4Form.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index ccdd743..cd4f967 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -1612,7 +1612,6 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question opt.Dock = DockStyle.None; tabProfiles.Controls.Remove(opt); - opt.Dispose(); optPop = false; opt = null; lBProfiles.Visible = true; From 49c7ee35cf6af3e36c7e13e9f4dc892ce03b5ee0 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 8 Feb 2019 21:04:08 -0600 Subject: [PATCH 35/54] Make remapping to xinput actions a two pass process again Related to issue #570 --- DS4Windows/DS4Control/Mapping.cs | 85 +++++++++++++++++++------------- 1 file changed, 51 insertions(+), 34 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 3db3eef..fa3eae1 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -58,6 +58,23 @@ namespace DS4Windows public bool[] dev = new bool[4]; } + struct ControlToXInput + { + public DS4Controls ds4input; + public DS4Controls xoutput; + + public ControlToXInput(DS4Controls input, DS4Controls output) + { + ds4input = input; xoutput = output; + } + } + + static Queue[] customMapQueue = new Queue[4] + { + new Queue(), new Queue(), + new Queue(), new Queue() + }; + public static SyntheticState globalState = new SyntheticState(); public static SyntheticState[] deviceState = new SyntheticState[4] { new SyntheticState(), new SyntheticState(), new SyntheticState(), @@ -1159,10 +1176,6 @@ namespace DS4Windows Mouse tp, ControlService ctrl) { /* TODO: This method is slow sauce. Find ways to speed up action execution */ - MappedState.LX = 128; - MappedState.LY = 128; - MappedState.RX = 128; - MappedState.RY = 128; double tempMouseDeltaX = 0.0; double tempMouseDeltaY = 0.0; int mouseDeltaX = 0; @@ -1181,7 +1194,7 @@ namespace DS4Windows MapCustomAction(device, cState, MappedState, eState, tp, ctrl, fieldMapping, outputfieldMapping); if (ctrl.DS4Controllers[device] == null) return; - cState.CopyTo(MappedState); + //cState.CopyTo(MappedState); //Dictionary tempControlDict = new Dictionary(); //MultiValueDict tempControlDict = new MultiValueDict(); @@ -1345,39 +1358,12 @@ namespace DS4Windows xboxControl = getX360ControlsByName(action.ToString()); } - if (xboxControl >= X360Controls.LXNeg && xboxControl <= X360Controls.RYPos) + if (xboxControl >= X360Controls.LXNeg && xboxControl <= X360Controls.Start) { DS4Controls tempDS4Control = reverseX360ButtonMapping[(int)xboxControl]; - int controlNum = (int)dcs.control; - int tempOutControl = (int)tempDS4Control; - DS4StateFieldMapping.ControlType controlType = DS4StateFieldMapping.mappedType[tempOutControl]; - bool alt = controlType == DS4StateFieldMapping.ControlType.AxisDir && tempOutControl % 2 == 0 ? true : false; - byte axisMapping = getXYAxisMapping2(device, dcs.control, cState, eState, tp, fieldMapping, alt); - if (axisMapping != 128) - { - int controlRelation = tempOutControl % 2 == 0 ? tempOutControl - 1 : tempOutControl + 1; - outputfieldMapping.axisdirs[tempOutControl] = axisMapping; - outputfieldMapping.axisdirs[controlRelation] = axisMapping; - } - + customMapQueue[device].Enqueue(new ControlToXInput(dcs.control, tempDS4Control)); //tempControlDict.Add(dcs.control, tempDS4Control); } - else if (xboxControl >= X360Controls.LB && xboxControl <= X360Controls.Start) - { - DS4Controls tempDS4Control = reverseX360ButtonMapping[(int)xboxControl]; - int controlNum = (int)dcs.control; - if (xboxControl == X360Controls.LT || xboxControl == X360Controls.RT) - { - byte axisMapping = getByteMapping2(device, dcs.control, cState, eState, tp, fieldMapping); - if (axisMapping != 0) - outputfieldMapping.triggers[(int)tempDS4Control] = axisMapping; - } - else - { - bool value = getBoolMapping2(device, dcs.control, cState, eState, tp, fieldMapping); - outputfieldMapping.buttons[(int)tempDS4Control] = value; - } - } else if (xboxControl >= X360Controls.LeftMouse && xboxControl <= X360Controls.WDOWN) { switch (xboxControl) @@ -1522,6 +1508,37 @@ namespace DS4Windows } } + Queue tempControl = customMapQueue[device]; + for (int i = 0, len = tempControl.Count; i < len; i++) + //while(tempControl.Any()) + { + ControlToXInput tempMap = tempControl.Dequeue(); + int controlNum = (int)tempMap.ds4input; + int tempOutControl = (int)tempMap.xoutput; + if (tempMap.xoutput >= DS4Controls.LXNeg && tempMap.xoutput <= DS4Controls.RYPos) + { + DS4StateFieldMapping.ControlType controlType = DS4StateFieldMapping.mappedType[tempOutControl]; + bool alt = controlType == DS4StateFieldMapping.ControlType.AxisDir && tempOutControl % 2 == 0 ? true : false; + byte axisMapping = getXYAxisMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping, alt); + int controlRelation = tempOutControl % 2 == 0 ? tempOutControl - 1 : tempOutControl + 1; + outputfieldMapping.axisdirs[tempOutControl] = axisMapping; + outputfieldMapping.axisdirs[controlRelation] = axisMapping; + } + else + { + if (tempMap.xoutput == DS4Controls.L2 || tempMap.xoutput == DS4Controls.R2) + { + byte axisMapping = getByteMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping); + outputfieldMapping.triggers[tempOutControl] = axisMapping; + } + else + { + bool value = getBoolMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping); + outputfieldMapping.buttons[tempOutControl] = value; + } + } + } + outputfieldMapping.populateState(MappedState); if (macroCount > 0) From fc40e0084627fac8d4dd1571b6e7bbf01cb03040 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 9 Feb 2019 11:06:31 -0600 Subject: [PATCH 36/54] Only take active binding into account for multiple binds. Fixes ATS profile. --- DS4Windows/DS4Control/Mapping.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index fa3eae1..00a86ff 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1520,21 +1520,26 @@ namespace DS4Windows DS4StateFieldMapping.ControlType controlType = DS4StateFieldMapping.mappedType[tempOutControl]; bool alt = controlType == DS4StateFieldMapping.ControlType.AxisDir && tempOutControl % 2 == 0 ? true : false; byte axisMapping = getXYAxisMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping, alt); - int controlRelation = tempOutControl % 2 == 0 ? tempOutControl - 1 : tempOutControl + 1; - outputfieldMapping.axisdirs[tempOutControl] = axisMapping; - outputfieldMapping.axisdirs[controlRelation] = axisMapping; + if (axisMapping != 128) + { + int controlRelation = tempOutControl % 2 == 0 ? tempOutControl - 1 : tempOutControl + 1; + outputfieldMapping.axisdirs[tempOutControl] = axisMapping; + outputfieldMapping.axisdirs[controlRelation] = axisMapping; + } } else { if (tempMap.xoutput == DS4Controls.L2 || tempMap.xoutput == DS4Controls.R2) { byte axisMapping = getByteMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping); - outputfieldMapping.triggers[tempOutControl] = axisMapping; + if (axisMapping != 0) + outputfieldMapping.triggers[tempOutControl] = axisMapping; } else { bool value = getBoolMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping); - outputfieldMapping.buttons[tempOutControl] = value; + if (value) + outputfieldMapping.buttons[tempOutControl] = value; } } } From 7631080d87362b424e163e49ae8eea45cb8f5748 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 9 Feb 2019 11:30:06 -0600 Subject: [PATCH 37/54] Add const variables to skip type casting --- DS4Windows/DS4Control/Mapping.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 00a86ff..29a0bcd 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1517,10 +1517,11 @@ namespace DS4Windows int tempOutControl = (int)tempMap.xoutput; if (tempMap.xoutput >= DS4Controls.LXNeg && tempMap.xoutput <= DS4Controls.RYPos) { + const byte axisDead = 128; DS4StateFieldMapping.ControlType controlType = DS4StateFieldMapping.mappedType[tempOutControl]; bool alt = controlType == DS4StateFieldMapping.ControlType.AxisDir && tempOutControl % 2 == 0 ? true : false; byte axisMapping = getXYAxisMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping, alt); - if (axisMapping != 128) + if (axisMapping != axisDead) { int controlRelation = tempOutControl % 2 == 0 ? tempOutControl - 1 : tempOutControl + 1; outputfieldMapping.axisdirs[tempOutControl] = axisMapping; @@ -1531,8 +1532,9 @@ namespace DS4Windows { if (tempMap.xoutput == DS4Controls.L2 || tempMap.xoutput == DS4Controls.R2) { + const byte axisZero = 0; byte axisMapping = getByteMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping); - if (axisMapping != 0) + if (axisMapping != axisZero) outputfieldMapping.triggers[tempOutControl] = axisMapping; } else From 43b9f9e0c4af0b86573b9627c173fd0f911da4d8 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 9 Feb 2019 11:36:39 -0600 Subject: [PATCH 38/54] Updated newest text file --- DS4Windows/newest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/newest.txt b/DS4Windows/newest.txt index 15d45d4..1df3b82 100644 --- a/DS4Windows/newest.txt +++ b/DS4Windows/newest.txt @@ -1 +1 @@ -1.6.9 +1.6.10 From 244bdae7f336704c87c7d9e9e9f2e26ea50a1b1f Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 9 Feb 2019 11:36:56 -0600 Subject: [PATCH 39/54] Version 1.6.10 --- DS4Windows/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index 15b3909..9608b42 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.9")] -[assembly: AssemblyFileVersion("1.6.9")] +[assembly: AssemblyVersion("1.6.10")] +[assembly: AssemblyFileVersion("1.6.10")] [assembly: NeutralResourcesLanguage("en")] From 42b75c717a8e44a7847f235340dea76678424ba0 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 9 Feb 2019 21:33:58 -0600 Subject: [PATCH 40/54] Added unchecked blocks for populating field mapping arrays Seems to help a lot --- DS4Windows/DS4Control/DS4StateFieldMapping.cs | 143 +++++++++--------- 1 file changed, 75 insertions(+), 68 deletions(-) diff --git a/DS4Windows/DS4Control/DS4StateFieldMapping.cs b/DS4Windows/DS4Control/DS4StateFieldMapping.cs index 2eb3daa..d99e472 100644 --- a/DS4Windows/DS4Control/DS4StateFieldMapping.cs +++ b/DS4Windows/DS4Control/DS4StateFieldMapping.cs @@ -63,93 +63,100 @@ namespace DS4Windows public void populateFieldMapping(DS4State cState, DS4StateExposed exposeState, Mouse tp, bool priorMouse = false) { - axisdirs[(int)DS4Controls.LXNeg] = cState.LX; - axisdirs[(int)DS4Controls.LXPos] = cState.LX; - axisdirs[(int)DS4Controls.LYNeg] = cState.LY; - axisdirs[(int)DS4Controls.LYPos] = cState.LY; + unchecked + { + axisdirs[(int)DS4Controls.LXNeg] = cState.LX; + axisdirs[(int)DS4Controls.LXPos] = cState.LX; + axisdirs[(int)DS4Controls.LYNeg] = cState.LY; + axisdirs[(int)DS4Controls.LYPos] = cState.LY; - axisdirs[(int)DS4Controls.RXNeg] = cState.RX; - axisdirs[(int)DS4Controls.RXPos] = cState.RX; - axisdirs[(int)DS4Controls.RYNeg] = cState.RY; - axisdirs[(int)DS4Controls.RYPos] = cState.RY; + axisdirs[(int)DS4Controls.RXNeg] = cState.RX; + axisdirs[(int)DS4Controls.RXPos] = cState.RX; + axisdirs[(int)DS4Controls.RYNeg] = cState.RY; + axisdirs[(int)DS4Controls.RYPos] = cState.RY; - triggers[(int)DS4Controls.L2] = cState.L2; - triggers[(int)DS4Controls.R2] = cState.R2; + triggers[(int)DS4Controls.L2] = cState.L2; + triggers[(int)DS4Controls.R2] = cState.R2; - buttons[(int)DS4Controls.L1] = cState.L1; - buttons[(int)DS4Controls.L3] = cState.L3; - buttons[(int)DS4Controls.R1] = cState.R1; - buttons[(int)DS4Controls.R3] = cState.R3; + buttons[(int)DS4Controls.L1] = cState.L1; + buttons[(int)DS4Controls.L3] = cState.L3; + buttons[(int)DS4Controls.R1] = cState.R1; + buttons[(int)DS4Controls.R3] = cState.R3; - buttons[(int)DS4Controls.Cross] = cState.Cross; - buttons[(int)DS4Controls.Triangle] = cState.Triangle; - buttons[(int)DS4Controls.Circle] = cState.Circle; - buttons[(int)DS4Controls.Square] = cState.Square; - buttons[(int)DS4Controls.PS] = cState.PS; - buttons[(int)DS4Controls.Options] = cState.Options; - buttons[(int)DS4Controls.Share] = cState.Share; + buttons[(int)DS4Controls.Cross] = cState.Cross; + buttons[(int)DS4Controls.Triangle] = cState.Triangle; + buttons[(int)DS4Controls.Circle] = cState.Circle; + buttons[(int)DS4Controls.Square] = cState.Square; + buttons[(int)DS4Controls.PS] = cState.PS; + buttons[(int)DS4Controls.Options] = cState.Options; + buttons[(int)DS4Controls.Share] = cState.Share; - buttons[(int)DS4Controls.DpadUp] = cState.DpadUp; - buttons[(int)DS4Controls.DpadRight] = cState.DpadRight; - buttons[(int)DS4Controls.DpadDown] = cState.DpadDown; - buttons[(int)DS4Controls.DpadLeft] = cState.DpadLeft; + buttons[(int)DS4Controls.DpadUp] = cState.DpadUp; + buttons[(int)DS4Controls.DpadRight] = cState.DpadRight; + buttons[(int)DS4Controls.DpadDown] = cState.DpadDown; + buttons[(int)DS4Controls.DpadLeft] = cState.DpadLeft; - buttons[(int)DS4Controls.TouchLeft] = tp != null ? (!priorMouse ? tp.leftDown : tp.priorLeftDown) : false; - buttons[(int)DS4Controls.TouchRight] = tp != null ? (!priorMouse ? tp.rightDown : tp.priorRightDown) : false; - buttons[(int)DS4Controls.TouchUpper] = tp != null ? (!priorMouse ? tp.upperDown : tp.priorUpperDown) : false; - buttons[(int)DS4Controls.TouchMulti] = tp != null ? (!priorMouse ? tp.multiDown : tp.priorMultiDown) : false; + buttons[(int)DS4Controls.TouchLeft] = tp != null ? (!priorMouse ? tp.leftDown : tp.priorLeftDown) : false; + buttons[(int)DS4Controls.TouchRight] = tp != null ? (!priorMouse ? tp.rightDown : tp.priorRightDown) : false; + buttons[(int)DS4Controls.TouchUpper] = tp != null ? (!priorMouse ? tp.upperDown : tp.priorUpperDown) : false; + buttons[(int)DS4Controls.TouchMulti] = tp != null ? (!priorMouse ? tp.multiDown : tp.priorMultiDown) : false; - int sixAxisX = -exposeState.getOutputAccelX(); - gryodirs[(int)DS4Controls.GyroXPos] = sixAxisX > 0 ? sixAxisX : 0; - gryodirs[(int)DS4Controls.GyroXNeg] = sixAxisX < 0 ? sixAxisX : 0; + int sixAxisX = -exposeState.getOutputAccelX(); + gryodirs[(int)DS4Controls.GyroXPos] = sixAxisX > 0 ? sixAxisX : 0; + gryodirs[(int)DS4Controls.GyroXNeg] = sixAxisX < 0 ? sixAxisX : 0; - int sixAxisZ = exposeState.getOutputAccelZ(); - gryodirs[(int)DS4Controls.GyroZPos] = sixAxisZ > 0 ? sixAxisZ : 0; - gryodirs[(int)DS4Controls.GyroZNeg] = sixAxisZ < 0 ? sixAxisZ : 0; + int sixAxisZ = exposeState.getOutputAccelZ(); + gryodirs[(int)DS4Controls.GyroZPos] = sixAxisZ > 0 ? sixAxisZ : 0; + gryodirs[(int)DS4Controls.GyroZNeg] = sixAxisZ < 0 ? sixAxisZ : 0; - swipedirs[(int)DS4Controls.SwipeLeft] = tp != null ? (!priorMouse ? tp.swipeLeftB : tp.priorSwipeLeftB) : (byte)0; - swipedirs[(int)DS4Controls.SwipeRight] = tp != null ? (!priorMouse ? tp.swipeRightB : tp.priorSwipeRightB) : (byte)0; - swipedirs[(int)DS4Controls.SwipeUp] = tp != null ? (!priorMouse ? tp.swipeUpB : tp.priorSwipeUpB) : (byte)0; - swipedirs[(int)DS4Controls.SwipeDown] = tp != null ? (!priorMouse ? tp.swipeDownB : tp.priorSwipeDownB) : (byte)0; + swipedirs[(int)DS4Controls.SwipeLeft] = tp != null ? (!priorMouse ? tp.swipeLeftB : tp.priorSwipeLeftB) : (byte)0; + swipedirs[(int)DS4Controls.SwipeRight] = tp != null ? (!priorMouse ? tp.swipeRightB : tp.priorSwipeRightB) : (byte)0; + swipedirs[(int)DS4Controls.SwipeUp] = tp != null ? (!priorMouse ? tp.swipeUpB : tp.priorSwipeUpB) : (byte)0; + swipedirs[(int)DS4Controls.SwipeDown] = tp != null ? (!priorMouse ? tp.swipeDownB : tp.priorSwipeDownB) : (byte)0; - swipedirbools[(int)DS4Controls.SwipeLeft] = tp != null ? (!priorMouse ? tp.swipeLeft : tp.priorSwipeLeft) : false; - swipedirbools[(int)DS4Controls.SwipeRight] = tp != null ? (!priorMouse ? tp.swipeRight : tp.priorSwipeRight) : false; - swipedirbools[(int)DS4Controls.SwipeUp] = tp != null ? (!priorMouse ? tp.swipeUp : tp.priorSwipeUp) : false; - swipedirbools[(int)DS4Controls.SwipeDown] = tp != null ? (!priorMouse ? tp.swipeDown : tp.priorSwipeDown) : false; + swipedirbools[(int)DS4Controls.SwipeLeft] = tp != null ? (!priorMouse ? tp.swipeLeft : tp.priorSwipeLeft) : false; + swipedirbools[(int)DS4Controls.SwipeRight] = tp != null ? (!priorMouse ? tp.swipeRight : tp.priorSwipeRight) : false; + swipedirbools[(int)DS4Controls.SwipeUp] = tp != null ? (!priorMouse ? tp.swipeUp : tp.priorSwipeUp) : false; + swipedirbools[(int)DS4Controls.SwipeDown] = tp != null ? (!priorMouse ? tp.swipeDown : tp.priorSwipeDown) : false; + } + } public void populateState(DS4State state) { - state.LX = axisdirs[(int)DS4Controls.LXNeg]; - state.LX = axisdirs[(int)DS4Controls.LXPos]; - state.LY = axisdirs[(int)DS4Controls.LYNeg]; - state.LY = axisdirs[(int)DS4Controls.LYPos]; + unchecked + { + state.LX = axisdirs[(int)DS4Controls.LXNeg]; + state.LX = axisdirs[(int)DS4Controls.LXPos]; + state.LY = axisdirs[(int)DS4Controls.LYNeg]; + state.LY = axisdirs[(int)DS4Controls.LYPos]; - state.RX = axisdirs[(int)DS4Controls.RXNeg]; - state.RX = axisdirs[(int)DS4Controls.RXPos]; - state.RY = axisdirs[(int)DS4Controls.RYNeg]; - state.RY = axisdirs[(int)DS4Controls.RYPos]; + state.RX = axisdirs[(int)DS4Controls.RXNeg]; + state.RX = axisdirs[(int)DS4Controls.RXPos]; + state.RY = axisdirs[(int)DS4Controls.RYNeg]; + state.RY = axisdirs[(int)DS4Controls.RYPos]; - state.L2 = triggers[(int)DS4Controls.L2]; - state.R2 = triggers[(int)DS4Controls.R2]; + state.L2 = triggers[(int)DS4Controls.L2]; + state.R2 = triggers[(int)DS4Controls.R2]; - state.L1 = buttons[(int)DS4Controls.L1]; - state.L3 = buttons[(int)DS4Controls.L3]; - state.R1 = buttons[(int)DS4Controls.R1]; - state.R3 = buttons[(int)DS4Controls.R3]; + state.L1 = buttons[(int)DS4Controls.L1]; + state.L3 = buttons[(int)DS4Controls.L3]; + state.R1 = buttons[(int)DS4Controls.R1]; + state.R3 = buttons[(int)DS4Controls.R3]; - state.Cross = buttons[(int)DS4Controls.Cross]; - state.Triangle = buttons[(int)DS4Controls.Triangle]; - state.Circle = buttons[(int)DS4Controls.Circle]; - state.Square = buttons[(int)DS4Controls.Square]; - state.PS = buttons[(int)DS4Controls.PS]; - state.Options = buttons[(int)DS4Controls.Options]; - state.Share = buttons[(int)DS4Controls.Share]; + state.Cross = buttons[(int)DS4Controls.Cross]; + state.Triangle = buttons[(int)DS4Controls.Triangle]; + state.Circle = buttons[(int)DS4Controls.Circle]; + state.Square = buttons[(int)DS4Controls.Square]; + state.PS = buttons[(int)DS4Controls.PS]; + state.Options = buttons[(int)DS4Controls.Options]; + state.Share = buttons[(int)DS4Controls.Share]; - state.DpadUp = buttons[(int)DS4Controls.DpadUp]; - state.DpadRight = buttons[(int)DS4Controls.DpadRight]; - state.DpadDown = buttons[(int)DS4Controls.DpadDown]; - state.DpadLeft = buttons[(int)DS4Controls.DpadLeft]; + state.DpadUp = buttons[(int)DS4Controls.DpadUp]; + state.DpadRight = buttons[(int)DS4Controls.DpadRight]; + state.DpadDown = buttons[(int)DS4Controls.DpadDown]; + state.DpadLeft = buttons[(int)DS4Controls.DpadLeft]; + } } } } From 2a4570bb735e077f51276d38ea2a99245f058302 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 10 Feb 2019 11:39:59 -0600 Subject: [PATCH 41/54] Include links to my Steam and GOG library listings to help point out testing targets --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index fc90714..c310ec9 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,21 @@ use DS4Windows properly, you have to open Steam Big Picture Mode, navigate to Settings > Controller> Controller Settings and uncheck **Xbox Configuration Support** along with **PlayStation Configuration Support**. +## Personal Game Testing + +My PC game library is not that expansive so there are likely games +that will be tested by users that I will not have access to +playing. There are likely going to be times when I cannot directly test +against a game since I will not have access to play it. Most free to play +games or games that include a playable demo should be fine for testing. +For other games, it might be better if people could test against any game +that I have in my game library and try to reproduce a problem. Here are +links to my Steam and GOG profiles so that people can see what games I have +access to play. + +https://steamcommunity.com/id/Ryochan7/games/?tab=all +https://www.gog.com/u/Ryochan7/games + ## Pull Requests Pull requests for DS4Windows are welcome. Before making a pull request, please From ce0ac67dcd7703edca9d4c04d2a2466fc7e81431 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Mon, 11 Feb 2019 23:51:26 -0600 Subject: [PATCH 42/54] Remove some struct copying from lightbar routine --- DS4Windows/DS4Control/DS4LightBar.cs | 36 +++++++++++++++++++++------- DS4Windows/DS4Control/Mapping.cs | 4 ++-- DS4Windows/DS4Control/ScpUtil.cs | 17 +++++++------ 3 files changed, 40 insertions(+), 17 deletions(-) diff --git a/DS4Windows/DS4Control/DS4LightBar.cs b/DS4Windows/DS4Control/DS4LightBar.cs index 0a146c6..c81baf4 100644 --- a/DS4Windows/DS4Control/DS4LightBar.cs +++ b/DS4Windows/DS4Control/DS4LightBar.cs @@ -49,7 +49,7 @@ namespace DS4Windows { DS4Color fullColor = getCustomColor(deviceNum); DS4Color lowColor = getLowColor(deviceNum); - color = getTransitionedColor(lowColor, fullColor, device.getBattery()); + color = getTransitionedColor(ref lowColor, ref fullColor, device.getBattery()); } else color = getCustomColor(deviceNum); @@ -85,7 +85,7 @@ namespace DS4Windows { DS4Color fullColor = getMainColor(deviceNum); DS4Color lowColor = getLowColor(deviceNum); - color = getTransitionedColor(lowColor, fullColor, device.getBattery()); + color = getTransitionedColor(ref lowColor, ref fullColor, device.getBattery()); } else { @@ -144,7 +144,8 @@ namespace DS4Windows } } - color = getTransitionedColor(color, new DS4Color(0, 0, 0), ratio); + DS4Color tempCol = new DS4Color(0, 0, 0); + color = getTransitionedColor(ref color, ref tempCol, ratio); } } @@ -159,11 +160,16 @@ namespace DS4Windows double ratio = 100.0 * (botratio / topratio), elapsed = ratio; if (ratio >= 50.0 && ratio < 100.0) { - color = getTransitionedColor(color, new DS4Color(0, 0, 0), + DS4Color emptyCol = new DS4Color(0, 0, 0); + color = getTransitionedColor(ref color, ref emptyCol, (uint)(-100.0 * (elapsed = 0.02 * (ratio - 50.0)) * (elapsed - 2.0))); } else if (ratio >= 100.0) - color = getTransitionedColor(color, new DS4Color(0, 0, 0), 100.0); + { + DS4Color emptyCol = new DS4Color(0, 0, 0); + color = getTransitionedColor(ref color, ref emptyCol, 100.0); + } + } if (device.isCharging() && device.getBattery() < 100) @@ -217,7 +223,8 @@ namespace DS4Windows } } - color = getTransitionedColor(color, new DS4Color(0, 0, 0), ratio); + DS4Color emptyCol = new DS4Color(0, 0, 0); + color = getTransitionedColor(ref color, ref emptyCol, ratio); break; } case 2: @@ -257,9 +264,22 @@ namespace DS4Windows float rumble = device.getLeftHeavySlowRumble() / 2.55f; byte max = Max(color.red, Max(color.green, color.blue)); if (device.getLeftHeavySlowRumble() > 100) - color = getTransitionedColor(new DS4Color(max, max, 0), new DS4Color(255, 0, 0), rumble); + { + DS4Color maxCol = new DS4Color(max, max, 0); + DS4Color redCol = new DS4Color(255, 0, 0); + color = getTransitionedColor(ref maxCol, ref redCol, rumble); + } + else - color = getTransitionedColor(color, getTransitionedColor(new DS4Color(max, max, 0), new DS4Color(255, 0, 0), 39.6078f), device.getLeftHeavySlowRumble()); + { + DS4Color maxCol = new DS4Color(max, max, 0); + DS4Color redCol = new DS4Color(255, 0, 0); + DS4Color tempCol = getTransitionedColor(ref maxCol, + ref redCol, 39.6078f); + color = getTransitionedColor(ref color, ref tempCol, + device.getLeftHeavySlowRumble()); + } + } DS4HapticState haptics = new DS4HapticState diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 29a0bcd..391456d 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1885,9 +1885,9 @@ namespace DS4Windows } DS4Color empty = new DS4Color(byte.Parse(dets[3]), byte.Parse(dets[4]), byte.Parse(dets[5])); DS4Color full = new DS4Color(byte.Parse(dets[6]), byte.Parse(dets[7]), byte.Parse(dets[8])); - DS4Color trans = getTransitionedColor(empty, full, d.Battery); + DS4Color trans = getTransitionedColor(ref empty, ref full, d.Battery); if (fadetimer[device] < 100) - DS4LightBar.forcedColor[device] = getTransitionedColor(lastColor[device], trans, fadetimer[device] += 2); + DS4LightBar.forcedColor[device] = getTransitionedColor(ref lastColor[device], ref trans, fadetimer[device] += 2); } actionDone[index].dev[device] = true; } diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 4e2ee7a..9e707bc 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -1319,17 +1319,20 @@ namespace DS4Windows else if (r < 0.0) r = 0.0; - r /= 100.0; - return (byte)Math.Round((b1 * (1 - r) + b2 * r), 0); + r *= 0.01; + return (byte)Math.Round((b1 * (1 - r)) + b2 * r, 0); } - public static DS4Color getTransitionedColor(DS4Color c1, DS4Color c2, double ratio) + public static DS4Color getTransitionedColor(ref DS4Color c1, ref DS4Color c2, double ratio) { //Color cs = Color.FromArgb(c1.red, c1.green, c1.blue); - c1.red = applyRatio(c1.red, c2.red, ratio); - c1.green = applyRatio(c1.green, c2.green, ratio); - c1.blue = applyRatio(c1.blue, c2.blue, ratio); - return c1; + DS4Color cs = new DS4Color + { + red = applyRatio(c1.red, c2.red, ratio), + green = applyRatio(c1.green, c2.green, ratio), + blue = applyRatio(c1.blue, c2.blue, ratio) + }; + return cs; } private static Color applyRatio(Color c1, Color c2, uint r) From 6098c91e2913e52348bbfc708522965892410580 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 12 Feb 2019 01:31:18 -0600 Subject: [PATCH 43/54] Use ref for more color struct routines --- DS4Windows/DS4Control/DS4LightBar.cs | 10 +++++----- DS4Windows/DS4Control/ScpUtil.cs | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/DS4Windows/DS4Control/DS4LightBar.cs b/DS4Windows/DS4Control/DS4LightBar.cs index c81baf4..5e72314 100644 --- a/DS4Windows/DS4Control/DS4LightBar.cs +++ b/DS4Windows/DS4Control/DS4LightBar.cs @@ -47,8 +47,8 @@ namespace DS4Windows { if (getLedAsBatteryIndicator(deviceNum)) { - DS4Color fullColor = getCustomColor(deviceNum); - DS4Color lowColor = getLowColor(deviceNum); + ref DS4Color fullColor = ref getCustomColor(deviceNum); + ref DS4Color lowColor = ref getLowColor(deviceNum); color = getTransitionedColor(ref lowColor, ref fullColor, device.getBattery()); } else @@ -83,8 +83,8 @@ namespace DS4Windows } else if (getLedAsBatteryIndicator(deviceNum)) { - DS4Color fullColor = getMainColor(deviceNum); - DS4Color lowColor = getLowColor(deviceNum); + ref DS4Color fullColor = ref getMainColor(deviceNum); + ref DS4Color lowColor = ref getLowColor(deviceNum); color = getTransitionedColor(ref lowColor, ref fullColor, device.getBattery()); } else @@ -95,7 +95,7 @@ namespace DS4Windows if (device.getBattery() <= getFlashAt(deviceNum) && !defaultLight && !device.isCharging()) { - DS4Color flashColor = getFlashColor(deviceNum); + ref DS4Color flashColor = ref getFlashColor(deviceNum); if (!(flashColor.red == 0 && flashColor.green == 0 && flashColor.blue == 0)) diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 9e707bc..9823864 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -794,27 +794,27 @@ namespace DS4Windows => m_Config.SetGyroMouseToggle(index, value, control); public static DS4Color[] MainColor => m_Config.m_Leds; - public static DS4Color getMainColor(int index) + public static ref DS4Color getMainColor(int index) { - return m_Config.m_Leds[index]; + return ref m_Config.m_Leds[index]; } public static DS4Color[] LowColor => m_Config.m_LowLeds; - public static DS4Color getLowColor(int index) + public static ref DS4Color getLowColor(int index) { - return m_Config.m_LowLeds[index]; + return ref m_Config.m_LowLeds[index]; } public static DS4Color[] ChargingColor => m_Config.m_ChargingLeds; - public static DS4Color getChargingColor(int index) + public static ref DS4Color getChargingColor(int index) { - return m_Config.m_ChargingLeds[index]; + return ref m_Config.m_ChargingLeds[index]; } public static DS4Color[] CustomColor => m_Config.m_CustomLeds; - public static DS4Color getCustomColor(int index) + public static ref DS4Color getCustomColor(int index) { - return m_Config.m_CustomLeds[index]; + return ref m_Config.m_CustomLeds[index]; } public static bool[] UseCustomLed => m_Config.useCustomLeds; @@ -824,9 +824,9 @@ namespace DS4Windows } public static DS4Color[] FlashColor => m_Config.m_FlashLeds; - public static DS4Color getFlashColor(int index) + public static ref DS4Color getFlashColor(int index) { - return m_Config.m_FlashLeds[index]; + return ref m_Config.m_FlashLeds[index]; } public static byte[] TapSensitivity => m_Config.tapSensitivity; From 688bc01916ddca3ca74cfee3aae017c8225c1c24 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 12 Feb 2019 18:33:42 -0600 Subject: [PATCH 44/54] Target C# 7.3 --- DS4Windows/DS4Windows.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Windows.csproj b/DS4Windows/DS4Windows.csproj index edf5bf5..8e2e478 100644 --- a/DS4Windows/DS4Windows.csproj +++ b/DS4Windows/DS4Windows.csproj @@ -82,7 +82,7 @@ MinimumRecommendedRules.ruleset WIN64 On - 7.2 + 7.3 false true 1 From 5b19dc76cda16d761be8b90b467ff301209e25ac Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 15 Feb 2019 18:04:09 -0600 Subject: [PATCH 45/54] Re-added extra default axis mapping pass Related to issue #579 --- DS4Windows/DS4Control/Mapping.cs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 391456d..e5ff393 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1506,6 +1506,15 @@ namespace DS4Windows resetToDefaultValue2(dcs.control, MappedState, outputfieldMapping); } } + else + { + DS4StateFieldMapping.ControlType controlType = DS4StateFieldMapping.mappedType[(int)dcs.control]; + if (controlType == DS4StateFieldMapping.ControlType.AxisDir) + //if (dcs.control > DS4Controls.None && dcs.control < DS4Controls.L1) + { + customMapQueue[device].Enqueue(new ControlToXInput(dcs.control, dcs.control)); + } + } } Queue tempControl = customMapQueue[device]; @@ -3371,9 +3380,9 @@ namespace DS4Windows private static byte getXYAxisMapping2(int device, DS4Controls control, DS4State cState, DS4StateExposed eState, Mouse tp, DS4StateFieldMapping fieldMap, bool alt = false) { + const byte falseVal = 128; byte result = 0; byte trueVal = 0; - byte falseVal = 128; if (alt) trueVal = 255; @@ -3391,11 +3400,11 @@ namespace DS4Windows switch (control) { - case DS4Controls.LXNeg: if (!alt) result = cState.LX; else result = (byte)(255 - cState.LX); break; - case DS4Controls.LYNeg: if (!alt) result = cState.LY; else result = (byte)(255 - cState.LY); break; - case DS4Controls.RXNeg: if (!alt) result = cState.RX; else result = (byte)(255 - cState.RX); break; - case DS4Controls.RYNeg: if (!alt) result = cState.RY; else result = (byte)(255 - cState.RY); break; - default: if (!alt) result = (byte)(255 - axisValue); else result = axisValue; break; + case DS4Controls.LXNeg: if (!alt) result = axisValue < falseVal ? axisValue : falseVal; else result = axisValue < falseVal ? (byte)(255 - axisValue) : falseVal; break; + case DS4Controls.LYNeg: if (!alt) result = axisValue < falseVal ? axisValue : falseVal; else result = axisValue < falseVal ? (byte)(255 - axisValue) : falseVal; break; + case DS4Controls.RXNeg: if (!alt) result = axisValue < falseVal ? axisValue : falseVal; else result = axisValue < falseVal ? (byte)(255 - axisValue) : falseVal; break; + case DS4Controls.RYNeg: if (!alt) result = axisValue < falseVal ? axisValue : falseVal; else result = axisValue < falseVal ? (byte)(255 - axisValue) : falseVal; break; + default: if (!alt) result = axisValue > falseVal ? (byte)(255 - axisValue) : falseVal; else result = axisValue > falseVal ? axisValue : falseVal; break; } } else if (controlType == DS4StateFieldMapping.ControlType.Trigger) From 50109282f46e0d06cd2b74caa7643b1d179be413 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 15 Feb 2019 21:58:00 -0600 Subject: [PATCH 46/54] Added unchecked region --- DS4Windows/DS4Control/Mapping.cs | 59 +++++++++++++++++--------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index e5ff393..a1b1d7d 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1512,45 +1512,50 @@ namespace DS4Windows if (controlType == DS4StateFieldMapping.ControlType.AxisDir) //if (dcs.control > DS4Controls.None && dcs.control < DS4Controls.L1) { + //int current = (int)dcs.control; + //outputfieldMapping.axisdirs[current] = fieldMapping.axisdirs[current]; customMapQueue[device].Enqueue(new ControlToXInput(dcs.control, dcs.control)); } } } Queue tempControl = customMapQueue[device]; - for (int i = 0, len = tempControl.Count; i < len; i++) - //while(tempControl.Any()) + unchecked { - ControlToXInput tempMap = tempControl.Dequeue(); - int controlNum = (int)tempMap.ds4input; - int tempOutControl = (int)tempMap.xoutput; - if (tempMap.xoutput >= DS4Controls.LXNeg && tempMap.xoutput <= DS4Controls.RYPos) + for (int i = 0, len = tempControl.Count; i < len; i++) + //while(tempControl.Any()) { - const byte axisDead = 128; - DS4StateFieldMapping.ControlType controlType = DS4StateFieldMapping.mappedType[tempOutControl]; - bool alt = controlType == DS4StateFieldMapping.ControlType.AxisDir && tempOutControl % 2 == 0 ? true : false; - byte axisMapping = getXYAxisMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping, alt); - if (axisMapping != axisDead) + ControlToXInput tempMap = tempControl.Dequeue(); + int controlNum = (int)tempMap.ds4input; + int tempOutControl = (int)tempMap.xoutput; + if (tempMap.xoutput >= DS4Controls.LXNeg && tempMap.xoutput <= DS4Controls.RYPos) { - int controlRelation = tempOutControl % 2 == 0 ? tempOutControl - 1 : tempOutControl + 1; - outputfieldMapping.axisdirs[tempOutControl] = axisMapping; - outputfieldMapping.axisdirs[controlRelation] = axisMapping; - } - } - else - { - if (tempMap.xoutput == DS4Controls.L2 || tempMap.xoutput == DS4Controls.R2) - { - const byte axisZero = 0; - byte axisMapping = getByteMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping); - if (axisMapping != axisZero) - outputfieldMapping.triggers[tempOutControl] = axisMapping; + const byte axisDead = 128; + DS4StateFieldMapping.ControlType controlType = DS4StateFieldMapping.mappedType[tempOutControl]; + bool alt = controlType == DS4StateFieldMapping.ControlType.AxisDir && tempOutControl % 2 == 0 ? true : false; + byte axisMapping = getXYAxisMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping, alt); + if (axisMapping != axisDead) + { + int controlRelation = tempOutControl % 2 == 0 ? tempOutControl - 1 : tempOutControl + 1; + outputfieldMapping.axisdirs[tempOutControl] = axisMapping; + outputfieldMapping.axisdirs[controlRelation] = axisMapping; + } } else { - bool value = getBoolMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping); - if (value) - outputfieldMapping.buttons[tempOutControl] = value; + if (tempMap.xoutput == DS4Controls.L2 || tempMap.xoutput == DS4Controls.R2) + { + const byte axisZero = 0; + byte axisMapping = getByteMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping); + if (axisMapping != axisZero) + outputfieldMapping.triggers[tempOutControl] = axisMapping; + } + else + { + bool value = getBoolMapping2(device, tempMap.ds4input, cState, eState, tp, fieldMapping); + if (value) + outputfieldMapping.buttons[tempOutControl] = value; + } } } } From cd6742cf56142639b4182707e586652cd04d34d4 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 16 Feb 2019 02:16:56 -0600 Subject: [PATCH 47/54] Found faster way to iterate over a ValueCollection --- DS4Windows/DS4Control/Mapping.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index a1b1d7d..44199c1 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -40,9 +40,11 @@ namespace DS4Windows //foreach (KeyPresses kp in keyPresses.Values) Dictionary.ValueCollection keyValues = keyPresses.Values; - for (int i = 0, kpCount = keyValues.Count; i < kpCount; i++) + for (var keyEnum = keyValues.GetEnumerator(); keyEnum.MoveNext();) + //for (int i = 0, kpCount = keyValues.Count; i < kpCount; i++) { - KeyPresses kp = keyValues.ElementAt(i); + //KeyPresses kp = keyValues.ElementAt(i); + KeyPresses kp = keyEnum.Current; kp.previous = kp.current; if (performClear) { From 61a5ab07eac507bea08a6368f0d29a58f4fa7654 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 16 Feb 2019 02:25:54 -0600 Subject: [PATCH 48/54] Use enumeartor for KeyCollection as well --- DS4Windows/DS4Control/Mapping.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 44199c1..dc2a2ec 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -290,9 +290,11 @@ namespace DS4Windows // TODO what about the rest? e.g. repeat keys really ought to be on some set schedule Dictionary.KeyCollection kvpKeys = state.keyPresses.Keys; //foreach (KeyValuePair kvp in state.keyPresses) - for (int i = 0, keyCount = kvpKeys.Count; i < keyCount; i++) + //for (int i = 0, keyCount = kvpKeys.Count; i < keyCount; i++) + for (var keyEnum = kvpKeys.GetEnumerator(); keyEnum.MoveNext();) { - UInt16 kvpKey = kvpKeys.ElementAt(i); + //UInt16 kvpKey = kvpKeys.ElementAt(i); + UInt16 kvpKey = keyEnum.Current; SyntheticState.KeyPresses kvpValue = state.keyPresses[kvpKey]; SyntheticState.KeyPresses gkp; From 3417c08a87f99a6edb1d4b35e2ab023659c77f02 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 16 Feb 2019 02:41:13 -0600 Subject: [PATCH 49/54] Get rid of more ElementAt usage Old code is commented out as a reference --- DS4Windows/DS4Library/DS4Devices.cs | 6 ++++-- DS4Windows/HidLibrary/HidDevices.cs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/DS4Windows/DS4Library/DS4Devices.cs b/DS4Windows/DS4Library/DS4Devices.cs index 09c4a53..6aaa4f1 100644 --- a/DS4Windows/DS4Library/DS4Devices.cs +++ b/DS4Windows/DS4Library/DS4Devices.cs @@ -248,9 +248,11 @@ namespace DS4Windows if (disabledDevCount > 0) { List disabledDevList = new List(); - for (int i = 0, arlen = disabledDevCount; i < arlen; i++) + for (var devEnum = DisabledDevices.GetEnumerator(); devEnum.MoveNext();) + //for (int i = 0, arlen = disabledDevCount; i < arlen; i++) { - HidDevice tempDev = DisabledDevices.ElementAt(i); + //HidDevice tempDev = DisabledDevices.ElementAt(i); + HidDevice tempDev = devEnum.Current; if (tempDev != null) { if (tempDev.IsOpen && tempDev.IsConnected) diff --git a/DS4Windows/HidLibrary/HidDevices.cs b/DS4Windows/HidLibrary/HidDevices.cs index 00125eb..a3c35a0 100644 --- a/DS4Windows/HidLibrary/HidDevices.cs +++ b/DS4Windows/HidLibrary/HidDevices.cs @@ -46,9 +46,11 @@ namespace DS4Windows List foundDevs = new List(); int devInfoLen = devInfo.Length; IEnumerable temp = EnumerateDevices(); - for (int i = 0, len = temp.Count(); i < len; i++) + for (var devEnum = temp.GetEnumerator(); devEnum.MoveNext();) + //for (int i = 0, len = temp.Count(); i < len; i++) { - DeviceInfo x = temp.ElementAt(i); + DeviceInfo x = devEnum.Current; + //DeviceInfo x = temp.ElementAt(i); HidDevice tempDev = new HidDevice(x.Path, x.Description); bool found = false; for (int j = 0; !found && j < devInfoLen; j++) From a9e7a3cb5bbf6ed43e275f217ea0b6c158ec9aad Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 16 Feb 2019 02:50:53 -0600 Subject: [PATCH 50/54] More enumerator usage --- DS4Windows/DS4Control/ControlService.cs | 13 +++++++++---- DS4Windows/DS4Control/ScpUtil.cs | 6 ++++-- DS4Windows/DS4Library/DS4Devices.cs | 6 ++++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs index 82f5fb5..30a9db5 100644 --- a/DS4Windows/DS4Control/ControlService.cs +++ b/DS4Windows/DS4Control/ControlService.cs @@ -346,9 +346,12 @@ namespace DS4Windows DS4LightBar.defaultLight = false; //foreach (DS4Device device in devices) - for (int i = 0, devCount = devices.Count(); i < devCount; i++) + //for (int i = 0, devCount = devices.Count(); i < devCount; i++) + int i = 0; + for (var devEnum = devices.GetEnumerator(); devEnum.MoveNext(); i++) { - DS4Device device = devices.ElementAt(i); + DS4Device device = devEnum.Current; + //DS4Device device = devices.ElementAt(i); if (showlog) LogDebug(Properties.Resources.FoundController + device.getMacAddress() + " (" + device.getConnectionType() + ")"); @@ -561,9 +564,11 @@ namespace DS4Windows DS4Devices.findControllers(); IEnumerable devices = DS4Devices.getDS4Controllers(); //foreach (DS4Device device in devices) - for (int i = 0, devlen = devices.Count(); i < devlen; i++) + //for (int i = 0, devlen = devices.Count(); i < devlen; i++) + for (var devEnum = devices.GetEnumerator(); devEnum.MoveNext();) { - DS4Device device = devices.ElementAt(i); + DS4Device device = devEnum.Current; + //DS4Device device = devices.ElementAt(i); if (device.isDisconnectingStatus()) continue; diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 9823864..d33ba7d 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -3507,9 +3507,11 @@ namespace DS4Windows linkedXdoc.AppendChild(Node); Dictionary.KeyCollection serials = linkedProfiles.Keys; - for (int i = 0, itemCount = linkedProfiles.Count; i < itemCount; i++) + //for (int i = 0, itemCount = linkedProfiles.Count; i < itemCount; i++) + for (var serialEnum = serials.GetEnumerator(); serialEnum.MoveNext();) { - string serial = serials.ElementAt(i); + //string serial = serials.ElementAt(i); + string serial = serialEnum.Current; string profile = linkedProfiles[serial]; XmlElement link = linkedXdoc.CreateElement("MAC" + serial); link.InnerText = profile; diff --git a/DS4Windows/DS4Library/DS4Devices.cs b/DS4Windows/DS4Library/DS4Devices.cs index 6aaa4f1..c97ea87 100644 --- a/DS4Windows/DS4Library/DS4Devices.cs +++ b/DS4Windows/DS4Library/DS4Devices.cs @@ -179,9 +179,11 @@ namespace DS4Windows { IEnumerable devices = getDS4Controllers(); //foreach (DS4Device device in devices) - for (int i = 0, devCount = devices.Count(); i < devCount; i++) + //for (int i = 0, devCount = devices.Count(); i < devCount; i++) + for (var devEnum = devices.GetEnumerator(); devEnum.MoveNext();) { - DS4Device device = devices.ElementAt(i); + DS4Device device = devEnum.Current; + //DS4Device device = devices.ElementAt(i); device.StopUpdate(); //device.runRemoval(); device.HidDevice.CloseDevice(); From 40278c9d1bb28c273c48173f35ff345918667490 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 16 Feb 2019 15:49:36 -0600 Subject: [PATCH 51/54] Use enumerator for settings iteration --- DS4Windows/DS4Control/Mapping.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index dc2a2ec..76bfd70 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -1205,9 +1205,11 @@ namespace DS4Windows DS4Controls usingExtra = DS4Controls.None; List tempSettingsList = getDS4CSettings(device); //foreach (DS4ControlSettings dcs in getDS4CSettings(device)) - for (int settingIndex = 0, arlen = tempSettingsList.Count; settingIndex < arlen; settingIndex++) + //for (int settingIndex = 0, arlen = tempSettingsList.Count; settingIndex < arlen; settingIndex++) + for (var settingEnum = tempSettingsList.GetEnumerator(); settingEnum.MoveNext();) { - DS4ControlSettings dcs = tempSettingsList[settingIndex]; + //DS4ControlSettings dcs = tempSettingsList[settingIndex]; + DS4ControlSettings dcs = settingEnum.Current; object action = null; DS4ControlSettings.ActionType actionType = 0; DS4KeyType keyType = DS4KeyType.None; From 9baceec6568fcbf6bbefaf52dfeda0d91ed29779 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 17 Feb 2019 02:04:03 -0600 Subject: [PATCH 52/54] Update newest text file --- DS4Windows/newest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/newest.txt b/DS4Windows/newest.txt index 1df3b82..99c026b 100644 --- a/DS4Windows/newest.txt +++ b/DS4Windows/newest.txt @@ -1 +1 @@ -1.6.10 +1.6.11 From 7f94a33e973da95fd8f21d8827ad7ce70a61b935 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 17 Feb 2019 02:04:37 -0600 Subject: [PATCH 53/54] Version 1.6.11 --- DS4Windows/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index 9608b42..0f07a6f 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.10")] -[assembly: AssemblyFileVersion("1.6.10")] +[assembly: AssemblyVersion("1.6.11")] +[assembly: AssemblyFileVersion("1.6.11")] [assembly: NeutralResourcesLanguage("en")] From d609453f12d4bf760c0dd6ce524b88937b7392af Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Mon, 18 Feb 2019 18:33:36 -0600 Subject: [PATCH 54/54] Now target .NET Framework 4.6.2 Seems to work better than version 4.6.1 on my system --- DS4Windows/DS4Windows.csproj | 2 +- DS4Windows/app.config | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DS4Windows/DS4Windows.csproj b/DS4Windows/DS4Windows.csproj index 8e2e478..15ed516 100644 --- a/DS4Windows/DS4Windows.csproj +++ b/DS4Windows/DS4Windows.csproj @@ -9,7 +9,7 @@ Properties DS4Windows DS4Windows - v4.6.1 + v4.6.2 512 true diff --git a/DS4Windows/app.config b/DS4Windows/app.config index 38e445e..6475090 100644 --- a/DS4Windows/app.config +++ b/DS4Windows/app.config @@ -1,12 +1,12 @@ - + - +