Found a couple of old Jays2Kings bugs

Default gyro triggers and shift action scan code check
This commit is contained in:
Travis Nickles 2019-10-05 21:57:20 -05:00
parent 7f1c86ba7a
commit 78ef0fcd9d
2 changed files with 8 additions and 8 deletions

View File

@ -1895,8 +1895,8 @@ namespace DS4Windows
public bool[] useSAforMouse = new bool[5] { false, false, false, false, false };
public GyroOutMode[] gyroOutMode = new GyroOutMode[5] { GyroOutMode.Controls, GyroOutMode.Controls,
GyroOutMode.Controls, GyroOutMode.Controls, GyroOutMode.Controls };
public string[] sATriggers = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public string[] sAMouseStickTriggers = new string[5] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty };
public string[] sATriggers = new string[5] { "-1", "-1", "-1", "-1", "-1" };
public string[] sAMouseStickTriggers = new string[5] { "-1", "-1", "-1", "-1", "-1" };
public bool[] sATriggerCond = new bool[5] { true, true, true, true, true };
public bool[] sAMouseStickTriggerCond = new bool[5] { true, true, true, true, true };
public bool[] gyroMouseStickTriggerTurns = new bool[5] { true, true, true, true, true };
@ -3148,7 +3148,7 @@ namespace DS4Windows
catch { gyroOutMode[device] = GyroOutMode.Controls; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SATriggers"); sATriggers[device] = Item.InnerText; }
catch { sATriggers[device] = ""; missingSetting = true; }
catch { sATriggers[device] = "-1"; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/SATriggerCond"); sATriggerCond[device] = SaTriggerCondValue(Item.InnerText); }
catch { sATriggerCond[device] = true; missingSetting = true; }
@ -3164,7 +3164,7 @@ namespace DS4Windows
catch { PortOldGyroSettings(device); missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseStickTriggers"); sAMouseStickTriggers[device] = Item.InnerText; }
catch { sAMouseStickTriggers[device] = ""; missingSetting = true; }
catch { sAMouseStickTriggers[device] = "-1"; missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/" + rootname + "/GyroMouseStickTriggerCond"); sAMouseStickTriggerCond[device] = SaTriggerCondValue(Item.InnerText); }
catch { sAMouseStickTriggerCond[device] = true; missingSetting = true; }
@ -4613,10 +4613,10 @@ namespace DS4Windows
startTouchpadOff[device] = false;
useTPforControls[device] = false;
useSAforMouse[device] = false;
sATriggers[device] = string.Empty;
sATriggers[device] = "-1";
sATriggerCond[device] = true;
gyroOutMode[device] = GyroOutMode.Controls;
sAMouseStickTriggers[device] = string.Empty;
sAMouseStickTriggers[device] = "-1";
sAMouseStickTriggerCond[device] = true;
gyroMStickInfo[device].deadZone = 30; gyroMStickInfo[device].maxZone = 830;
gyroMStickInfo[device].antiDeadX = 0.4; gyroMStickInfo[device].antiDeadY = 0.4;

View File

@ -2223,10 +2223,10 @@ namespace DS4Windows.Forms
lbGyroXP.Text = UpdateButtonList(bnGyroXP);
}
private string UpdateButtonList(Button button, bool shift =false)
private string UpdateButtonList(Button button, bool shift = false)
{
object tagO = GetDS4Action(device, button.Name, shift);
bool SC = GetDS4KeyType(device, button.Name, false).HasFlag(DS4KeyType.ScanCode);
bool SC = GetDS4KeyType(device, button.Name, shift).HasFlag(DS4KeyType.ScanCode);
bool extracontrol = button.Name.Contains("Gyro") || button.Name.Contains("Swipe");
if (tagO != null)
{