diff --git a/DS4Windows/DS4Control/DS4StateFieldMapping.cs b/DS4Windows/DS4Control/DS4StateFieldMapping.cs index e8d88c7..98b9849 100644 --- a/DS4Windows/DS4Control/DS4StateFieldMapping.cs +++ b/DS4Windows/DS4Control/DS4StateFieldMapping.cs @@ -12,7 +12,7 @@ namespace DS4Windows public byte[] swipedirs = new byte[(int)DS4Controls.SwipeDown + 1]; public bool[] swipedirbools = new bool[(int)DS4Controls.SwipeDown + 1]; - public static ControlType[] mappedType = { ControlType.Unknown, // DS4Controls.None + public static ControlType[] mappedType = new ControlType[38] { ControlType.Unknown, // DS4Controls.None ControlType.AxisDir, // DS4Controls.LXNeg ControlType.AxisDir, // DS4Controls.LXPos ControlType.AxisDir, // DS4Controls.LYNeg diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index 8d858cb..8f92563 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -84,14 +84,14 @@ namespace DS4Windows public static DateTime[] oldnowKeyAct = new DateTime[4] { DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue }; - private static DS4Controls[] shiftTriggerMapping = { DS4Controls.None, DS4Controls.Cross, DS4Controls.Circle, DS4Controls.Square, + private static DS4Controls[] shiftTriggerMapping = new DS4Controls[26] { DS4Controls.None, DS4Controls.Cross, DS4Controls.Circle, DS4Controls.Square, DS4Controls.Triangle, DS4Controls.Options, DS4Controls.Share, DS4Controls.DpadUp, DS4Controls.DpadDown, DS4Controls.DpadLeft, DS4Controls.DpadRight, DS4Controls.PS, DS4Controls.L1, DS4Controls.R1, DS4Controls.L2, DS4Controls.R2, DS4Controls.L3, DS4Controls.R3, DS4Controls.TouchLeft, DS4Controls.TouchUpper, DS4Controls.TouchMulti, - DS4Controls.TouchRight, DS4Controls.GyroZNeg, DS4Controls.GyroZPos, DS4Controls.GyroXPos, DS4Controls.GyroXNeg + DS4Controls.TouchRight, DS4Controls.GyroZNeg, DS4Controls.GyroZPos, DS4Controls.GyroXPos, DS4Controls.GyroXNeg, }; - private static int[] ds4ControlMapping = { 0, // DS4Control.None + private static int[] ds4ControlMapping = new int[34] { 0, // DS4Control.None 16, // DS4Controls.LXNeg 20, // DS4Controls.LXPos 17, // DS4Controls.LYNeg @@ -1010,11 +1010,15 @@ namespace DS4Windows { result = false; } - else + else if (trigger < 26) { DS4Controls ds = shiftTriggerMapping[trigger]; result = getBoolMapping2(device, ds, cState, eState, tp, fieldMapping); } + else if (trigger == 26) + { + result = cState.Touch1Finger; + } return result; }