mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 02:54:20 +01:00
Merge branch 'jay' of https://github.com/Ryochan7/DS4Windows into jay
This commit is contained in:
commit
fe06f24399
@ -359,7 +359,7 @@ namespace DS4Windows
|
||||
tempBool = true;
|
||||
for (int i = 0, arlen = disArray.Length; tempBool && i < arlen; i++)
|
||||
{
|
||||
if (getDS4ControlsByName(disArray[i]) == false)
|
||||
if (disArray[i] == -1 || getDS4ControlsByName(disArray[i]) == false)
|
||||
tempBool = false;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -103,6 +103,7 @@ namespace DS4Windows.Forms
|
||||
{
|
||||
Global.FindConfigLocation();
|
||||
|
||||
bool firstRun = Global.firstRun;
|
||||
if (Global.firstRun)
|
||||
{
|
||||
new SaveWhere(Global.multisavespots).ShowDialog();
|
||||
@ -183,7 +184,7 @@ namespace DS4Windows.Forms
|
||||
blankControllerTab();
|
||||
|
||||
Directory.CreateDirectory(appdatapath);
|
||||
if (!Save()) //if can't write to file
|
||||
if (firstRun && !Save()) //if can't write to file
|
||||
{
|
||||
if (MessageBox.Show("Cannot write at current location\nCopy Settings to appdata?", "DS4Windows",
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
|
||||
@ -396,10 +397,14 @@ namespace DS4Windows.Forms
|
||||
}
|
||||
}
|
||||
|
||||
Form_Resize(null, null);
|
||||
if (!(StartMinimized || mini))
|
||||
{
|
||||
Show();
|
||||
}
|
||||
|
||||
this.Resize += Form_Resize;
|
||||
this.LocationChanged += TrackLocationChanged;
|
||||
if (!(StartMinimized || mini))
|
||||
Form_Resize(null, null);
|
||||
|
||||
Program.CreateIPCClassNameMMF(this.Handle);
|
||||
|
||||
|
@ -644,6 +644,7 @@ namespace DS4Windows.Forms
|
||||
cBTouchpadJitterCompensation.Checked = TouchpadJitterCompensation[device];
|
||||
|
||||
tempInt = TouchpadInvert[device];
|
||||
// Array values are set up so Array.IndexOf call is not necessary
|
||||
touchpadInvertComboBox.SelectedIndex = touchpadInvertToValue[tempInt];
|
||||
|
||||
cBlowerRCOn.Checked = LowerRCOn[device];
|
||||
@ -2222,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)
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user