mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-02-18 17:06:19 +01:00
Add finger on touchpad back as a shift modifier
This commit is contained in:
parent
a8442d2772
commit
aab2bb13f4
@ -12,7 +12,7 @@ namespace DS4Windows
|
|||||||
public byte[] swipedirs = new byte[(int)DS4Controls.SwipeDown + 1];
|
public byte[] swipedirs = new byte[(int)DS4Controls.SwipeDown + 1];
|
||||||
public bool[] swipedirbools = new bool[(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.LXNeg
|
||||||
ControlType.AxisDir, // DS4Controls.LXPos
|
ControlType.AxisDir, // DS4Controls.LXPos
|
||||||
ControlType.AxisDir, // DS4Controls.LYNeg
|
ControlType.AxisDir, // DS4Controls.LYNeg
|
||||||
|
@ -84,14 +84,14 @@ namespace DS4Windows
|
|||||||
public static DateTime[] oldnowKeyAct = new DateTime[4] { DateTime.MinValue,
|
public static DateTime[] oldnowKeyAct = new DateTime[4] { DateTime.MinValue,
|
||||||
DateTime.MinValue, DateTime.MinValue, 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.Triangle, DS4Controls.Options, DS4Controls.Share, DS4Controls.DpadUp, DS4Controls.DpadDown,
|
||||||
DS4Controls.DpadLeft, DS4Controls.DpadRight, DS4Controls.PS, DS4Controls.L1, DS4Controls.R1, DS4Controls.L2,
|
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.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
|
16, // DS4Controls.LXNeg
|
||||||
20, // DS4Controls.LXPos
|
20, // DS4Controls.LXPos
|
||||||
17, // DS4Controls.LYNeg
|
17, // DS4Controls.LYNeg
|
||||||
@ -1010,11 +1010,15 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
else
|
else if (trigger < 26)
|
||||||
{
|
{
|
||||||
DS4Controls ds = shiftTriggerMapping[trigger];
|
DS4Controls ds = shiftTriggerMapping[trigger];
|
||||||
result = getBoolMapping2(device, ds, cState, eState, tp, fieldMapping);
|
result = getBoolMapping2(device, ds, cState, eState, tp, fieldMapping);
|
||||||
}
|
}
|
||||||
|
else if (trigger == 26)
|
||||||
|
{
|
||||||
|
result = cState.Touch1Finger;
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user