Merge branch 'jay' into ds4emulate

# Conflicts:
#	DS4Windows/DS4Forms/Options.resx
This commit is contained in:
Travis Nickles 2019-04-21 02:07:28 -05:00
commit 6c72566e36
10 changed files with 2564 additions and 3864 deletions

View File

@ -656,6 +656,18 @@ namespace DS4Windows
get { return m_Config.useWhiteIcon; } get { return m_Config.useWhiteIcon; }
} }
public static bool UseCustomSteamFolder
{
set { m_Config.useCustomSteamFolder = value; }
get { return m_Config.useCustomSteamFolder; }
}
public static string CustomSteamFolder
{
set { m_Config.customSteamFolder = value; }
get { return m_Config.customSteamFolder; }
}
// controller/profile specfic values // controller/profile specfic values
public static int[] ButtonMouseSensitivity => m_Config.buttonMouseSensitivity; public static int[] ButtonMouseSensitivity => m_Config.buttonMouseSensitivity;
@ -1527,7 +1539,7 @@ namespace DS4Windows
public int[] l2AntiDeadzone = new int[5] { 0, 0, 0, 0, 0 }, r2AntiDeadzone = new int[5] { 0, 0, 0, 0, 0 }; public int[] l2AntiDeadzone = new int[5] { 0, 0, 0, 0, 0 }, r2AntiDeadzone = new int[5] { 0, 0, 0, 0, 0 };
public int[] l2Maxzone = new int[5] { 100, 100, 100, 100, 100 }, r2Maxzone = new int[5] { 100, 100, 100, 100, 100 }; public int[] l2Maxzone = new int[5] { 100, 100, 100, 100, 100 }, r2Maxzone = new int[5] { 100, 100, 100, 100, 100 };
public double[] LSRotation = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 }, RSRotation = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 }; public double[] LSRotation = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 }, RSRotation = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 };
public double[] SXDeadzone = new double[5] { 0.02, 0.02, 0.02, 0.02, 0.02 }, SZDeadzone = new double[5] { 0.02, 0.02, 0.02, 0.02, 0.02 }; public double[] SXDeadzone = new double[5] { 0.25, 0.25, 0.25, 0.25, 0.25 }, SZDeadzone = new double[5] { 0.25, 0.25, 0.25, 0.25, 0.25 };
public double[] SXMaxzone = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 }, public double[] SXMaxzone = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 },
SZMaxzone = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 }; SZMaxzone = new double[5] { 1.0, 1.0, 1.0, 1.0, 1.0 };
public double[] SXAntiDeadzone = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 }, public double[] SXAntiDeadzone = new double[5] { 0.0, 0.0, 0.0, 0.0, 0.0 },
@ -1650,6 +1662,8 @@ namespace DS4Windows
public int flashWhenLateAt = 20; public int flashWhenLateAt = 20;
public bool useUDPServ = false; public bool useUDPServ = false;
public int udpServPort = 26760; public int udpServPort = 26760;
public bool useCustomSteamFolder;
public string customSteamFolder;
// Cache whether profile has custom action // Cache whether profile has custom action
public bool[] containsCustomAction = new bool[5] { false, false, false, false, false }; public bool[] containsCustomAction = new bool[5] { false, false, false, false, false };
@ -3310,6 +3324,10 @@ namespace DS4Windows
catch { missingSetting = true; } catch { missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/Profile/UDPServerPort"); int temp; int.TryParse(Item.InnerText, out temp); udpServPort = Math.Min(Math.Max(temp, 1024), 65535); } try { Item = m_Xdoc.SelectSingleNode("/Profile/UDPServerPort"); int temp; int.TryParse(Item.InnerText, out temp); udpServPort = Math.Min(Math.Max(temp, 1024), 65535); }
catch { missingSetting = true; } catch { missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/Profile/UseCustomSteamFolder"); Boolean.TryParse(Item.InnerText, out useCustomSteamFolder); }
catch { missingSetting = true; }
try { Item = m_Xdoc.SelectSingleNode("/Profile/CustomSteamFolder"); customSteamFolder = Item.InnerText; }
catch { missingSetting = true; }
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{ {
@ -3379,6 +3397,8 @@ namespace DS4Windows
XmlNode xmlWhiteIcon = m_Xdoc.CreateNode(XmlNodeType.Element, "WhiteIcon", null); xmlWhiteIcon.InnerText = useWhiteIcon.ToString(); Node.AppendChild(xmlWhiteIcon); XmlNode xmlWhiteIcon = m_Xdoc.CreateNode(XmlNodeType.Element, "WhiteIcon", null); xmlWhiteIcon.InnerText = useWhiteIcon.ToString(); Node.AppendChild(xmlWhiteIcon);
XmlNode xmlUseUDPServ = m_Xdoc.CreateNode(XmlNodeType.Element, "UseUDPServer", null); xmlUseUDPServ.InnerText = useUDPServ.ToString(); Node.AppendChild(xmlUseUDPServ); XmlNode xmlUseUDPServ = m_Xdoc.CreateNode(XmlNodeType.Element, "UseUDPServer", null); xmlUseUDPServ.InnerText = useUDPServ.ToString(); Node.AppendChild(xmlUseUDPServ);
XmlNode xmlUDPServPort = m_Xdoc.CreateNode(XmlNodeType.Element, "UDPServerPort", null); xmlUDPServPort.InnerText = udpServPort.ToString(); Node.AppendChild(xmlUDPServPort); XmlNode xmlUDPServPort = m_Xdoc.CreateNode(XmlNodeType.Element, "UDPServerPort", null); xmlUDPServPort.InnerText = udpServPort.ToString(); Node.AppendChild(xmlUDPServPort);
XmlNode xmlUseCustomSteamFolder = m_Xdoc.CreateNode(XmlNodeType.Element, "UseCustomSteamFolder", null); xmlUseCustomSteamFolder.InnerText = useCustomSteamFolder.ToString(); Node.AppendChild(xmlUseCustomSteamFolder);
XmlNode xmlCustomSteamFolder = m_Xdoc.CreateNode(XmlNodeType.Element, "CustomSteamFolder", null); xmlCustomSteamFolder.InnerText = customSteamFolder; Node.AppendChild(xmlCustomSteamFolder);
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{ {
@ -4067,7 +4087,7 @@ namespace DS4Windows
l2Maxzone[device] = r2Maxzone[device] = 100; l2Maxzone[device] = r2Maxzone[device] = 100;
LSRotation[device] = 0.0; LSRotation[device] = 0.0;
RSRotation[device] = 0.0; RSRotation[device] = 0.0;
SXDeadzone[device] = SZDeadzone[device] = 0.02; SXDeadzone[device] = SZDeadzone[device] = 0.25;
SXMaxzone[device] = SZMaxzone[device] = 1.0; SXMaxzone[device] = SZMaxzone[device] = 1.0;
SXAntiDeadzone[device] = SZAntiDeadzone[device] = 0.0; SXAntiDeadzone[device] = SZAntiDeadzone[device] = 0.0;
l2Sens[device] = r2Sens[device] = 1; l2Sens[device] = r2Sens[device] = 1;

View File

@ -155,6 +155,8 @@
this.ckUdpServ = new System.Windows.Forms.CheckBox(); this.ckUdpServ = new System.Windows.Forms.CheckBox();
this.nUDUdpPortNum = new System.Windows.Forms.NumericUpDown(); this.nUDUdpPortNum = new System.Windows.Forms.NumericUpDown();
this.languagePackComboBox1 = new DS4Windows.DS4Forms.LanguagePackComboBox(); this.languagePackComboBox1 = new DS4Windows.DS4Forms.LanguagePackComboBox();
this.cBCustomSteam = new System.Windows.Forms.CheckBox();
this.tBSteamFolder = new System.Windows.Forms.TextBox();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.linkProfiles = new System.Windows.Forms.LinkLabel(); this.linkProfiles = new System.Windows.Forms.LinkLabel();
this.lnkControllers = new System.Windows.Forms.LinkLabel(); this.lnkControllers = new System.Windows.Forms.LinkLabel();
@ -954,6 +956,8 @@
this.fLPSettings.Controls.Add(this.pNUpdate); this.fLPSettings.Controls.Add(this.pNUpdate);
this.fLPSettings.Controls.Add(this.panel4); this.fLPSettings.Controls.Add(this.panel4);
this.fLPSettings.Controls.Add(this.languagePackComboBox1); this.fLPSettings.Controls.Add(this.languagePackComboBox1);
this.fLPSettings.Controls.Add(this.cBCustomSteam);
this.fLPSettings.Controls.Add(this.tBSteamFolder);
this.fLPSettings.Controls.Add(this.flowLayoutPanel1); this.fLPSettings.Controls.Add(this.flowLayoutPanel1);
this.fLPSettings.Name = "fLPSettings"; this.fLPSettings.Name = "fLPSettings";
// //
@ -1211,6 +1215,19 @@
this.languagePackComboBox1.Name = "languagePackComboBox1"; this.languagePackComboBox1.Name = "languagePackComboBox1";
this.languagePackComboBox1.SelectedValueChanged += new System.EventHandler(this.languagePackComboBox1_SelectedValueChanged); this.languagePackComboBox1.SelectedValueChanged += new System.EventHandler(this.languagePackComboBox1_SelectedValueChanged);
// //
// cBCustomSteam
//
resources.ApplyResources(this.cBCustomSteam, "cBCustomSteam");
this.cBCustomSteam.Name = "cBCustomSteam";
this.cBCustomSteam.UseVisualStyleBackColor = false;
this.cBCustomSteam.CheckedChanged += new System.EventHandler(this.cBCustomSteam_CheckedChanged);
//
// tBSteamFolder
//
resources.ApplyResources(this.tBSteamFolder, "tBSteamFolder");
this.tBSteamFolder.Name = "tBSteamFolder";
this.tBSteamFolder.TextChanged += new System.EventHandler(this.tBSteamFolder_TextChanged);
//
// flowLayoutPanel1 // flowLayoutPanel1
// //
this.flowLayoutPanel1.BackColor = System.Drawing.SystemColors.Window; this.flowLayoutPanel1.BackColor = System.Drawing.SystemColors.Window;
@ -1513,6 +1530,8 @@
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox ckUdpServ; private System.Windows.Forms.CheckBox ckUdpServ;
private System.Windows.Forms.NumericUpDown nUDUdpPortNum; private System.Windows.Forms.NumericUpDown nUDUdpPortNum;
private System.Windows.Forms.CheckBox cBCustomSteam;
private System.Windows.Forms.TextBox tBSteamFolder;
//private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; //private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
} }
} }

View File

@ -199,6 +199,8 @@ namespace DS4Windows
cBDisconnectBT.Checked = DCBTatStop; cBDisconnectBT.Checked = DCBTatStop;
cBQuickCharge.Checked = QuickCharge; cBQuickCharge.Checked = QuickCharge;
cBCustomSteam.Checked = UseCustomSteamFolder;
tBSteamFolder.Text = CustomSteamFolder;
// New settings // New settings
this.Width = FormWidth; this.Width = FormWidth;
this.Height = FormHeight; this.Height = FormHeight;
@ -2035,6 +2037,17 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question
} }
} }
private void cBCustomSteam_CheckedChanged(object sender, EventArgs e)
{
UseCustomSteamFolder = cBCustomSteam.Checked;
tBSteamFolder.Enabled = cBCustomSteam.Checked;
}
private void tBSteamFolder_TextChanged(object sender, EventArgs e)
{
CustomSteamFolder = tBSteamFolder.Text;
}
private void nUDUpdateTime_ValueChanged(object sender, EventArgs e) private void nUDUpdateTime_ValueChanged(object sender, EventArgs e)
{ {
int currentIndex = cBUpdateTime.SelectedIndex; int currentIndex = cBUpdateTime.SelectedIndex;

View File

@ -2832,6 +2832,63 @@
<data name="&gt;&gt;languagePackComboBox1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;languagePackComboBox1.ZOrder" xml:space="preserve">
<value>15</value> <value>15</value>
</data> </data>
<data name="cBCustomSteam.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cBCustomSteam.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="cBCustomSteam.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cBCustomSteam.Location" type="System.Drawing.Point, System.Drawing">
<value>274, 144</value>
</data>
<data name="cBCustomSteam.Size" type="System.Drawing.Size, System.Drawing">
<value>147, 17</value>
</data>
<data name="cBCustomSteam.TabIndex" type="System.Int32, mscorlib">
<value>65</value>
</data>
<data name="cBCustomSteam.Text" xml:space="preserve">
<value>Use custom Steam Folder</value>
</data>
<data name="&gt;&gt;cBCustomSteam.Name" xml:space="preserve">
<value>cBCustomSteam</value>
</data>
<data name="&gt;&gt;cBCustomSteam.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cBCustomSteam.Parent" xml:space="preserve">
<value>fLPSettings</value>
</data>
<data name="&gt;&gt;cBCustomSteam.ZOrder" xml:space="preserve">
<value>16</value>
</data>
<data name="tBSteamFolder.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="tBSteamFolder.Location" type="System.Drawing.Point, System.Drawing">
<value>274, 167</value>
</data>
<data name="tBSteamFolder.Size" type="System.Drawing.Size, System.Drawing">
<value>260, 20</value>
</data>
<data name="tBSteamFolder.TabIndex" type="System.Int32, mscorlib">
<value>53</value>
</data>
<data name="&gt;&gt;tBSteamFolder.Name" xml:space="preserve">
<value>tBSteamFolder</value>
</data>
<data name="&gt;&gt;tBSteamFolder.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tBSteamFolder.Parent" xml:space="preserve">
<value>fLPSettings</value>
</data>
<data name="&gt;&gt;tBSteamFolder.ZOrder" xml:space="preserve">
<value>17</value>
</data>
<data name="linkProfiles.AutoSize" type="System.Boolean, mscorlib"> <data name="linkProfiles.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
</data> </data>

View File

@ -1632,7 +1632,7 @@
0}); 0});
this.nUDSZ.Name = "nUDSZ"; this.nUDSZ.Name = "nUDSZ";
this.nUDSZ.Value = new decimal(new int[] { this.nUDSZ.Value = new decimal(new int[] {
2, 25,
0, 0,
0, 0,
131072}); 131072});
@ -1654,7 +1654,7 @@
0}); 0});
this.nUDSX.Name = "nUDSX"; this.nUDSX.Name = "nUDSX";
this.nUDSX.Value = new decimal(new int[] { this.nUDSX.Value = new decimal(new int[] {
2, 25,
0, 0,
0, 0,
131072}); 131072});

View File

@ -580,7 +580,7 @@ namespace DS4Windows
} }
catch catch
{ {
nUDSX.Value = 0.02m; nUDSX.Value = 0.25m;
} }
try try
@ -589,7 +589,7 @@ namespace DS4Windows
} }
catch catch
{ {
nUDSZ.Value = 0.02m; nUDSZ.Value = 0.25m;
} }
try try
@ -864,8 +864,8 @@ namespace DS4Windows
nUDRSMaxZone.Value = 1; nUDRSMaxZone.Value = 1;
nUDLSRotation.Value = 0; nUDLSRotation.Value = 0;
nUDRSRotation.Value = 0; nUDRSRotation.Value = 0;
nUDSX.Value = 0.02m; nUDSX.Value = 0.25m;
nUDSZ.Value = 0.02m; nUDSZ.Value = 0.25m;
nUDSixAxisXMaxZone.Value = 1.0m; nUDSixAxisXMaxZone.Value = 1.0m;
nUDSixAxisZMaxZone.Value = 1.0m; nUDSixAxisZMaxZone.Value = 1.0m;
nUDSixaxisXAntiDead.Value = 0.0m; nUDSixaxisXAntiDead.Value = 0.0m;

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,7 @@ using System.Runtime.InteropServices;
using System.Threading; using System.Threading;
using System.Diagnostics; using System.Diagnostics;
using System.Threading.Tasks; using System.Threading.Tasks;
using static DS4Windows.Global;
namespace DS4Windows namespace DS4Windows
{ {
@ -25,8 +26,8 @@ namespace DS4Windows
List<string> programpaths = new List<string>(); List<string> programpaths = new List<string>();
List<string> lodsf = new List<string>(); List<string> lodsf = new List<string>();
bool appsloaded = false; bool appsloaded = false;
const string steamCommx86Loc = @"C:\Program Files (x86)\Steam\steamapps\common"; public const string steamCommx86Loc = @"C:\Program Files (x86)\Steam\steamapps\common";
const string steamCommLoc = @"C:\Program Files\Steam\steamapps\common"; public const string steamCommLoc = @"C:\Program Files\Steam\steamapps\common";
const string originx86Loc = @"C:\Program Files (x86)\Origin Games"; const string originx86Loc = @"C:\Program Files (x86)\Origin Games";
const string originLoc = @"C:\Program Files\Origin Games"; const string originLoc = @"C:\Program Files\Origin Games";
@ -48,7 +49,9 @@ namespace DS4Windows
LoadP(); LoadP();
if (Directory.Exists(steamCommx86Loc)) if (UseCustomSteamFolder && Directory.Exists(CustomSteamFolder))
steamgamesdir = CustomSteamFolder;
else if (Directory.Exists(steamCommx86Loc))
steamgamesdir = steamCommx86Loc; steamgamesdir = steamCommx86Loc;
else if (Directory.Exists(steamCommLoc)) else if (Directory.Exists(steamCommLoc))
steamgamesdir = steamCommLoc; steamgamesdir = steamCommLoc;

View File

@ -1,6 +1,8 @@
# TODO # TODO
* Finalize DS4 Emulation * Finalize DS4 Emulation
* Raise Sixaxis default dead zones
* Evaluate latest ViGEmBus driver and update download URL
* ~~Remove old welcome dialog and make new driver installer executable. * ~~Remove old welcome dialog and make new driver installer executable.
Use newer standards (WPF) and bundle app with DS4Windows~~ Use newer standards (WPF) and bundle app with DS4Windows~~

View File

@ -1,9 +1,9 @@
Travis Nickles (Ryochan7) Travis Nickles (Ryochan7)
Korney Czukowski (czukowski) Korney Czukowski (czukowski)
mika-n
jdfeng jdfeng
justalemon justalemon
mika-n
Rajko Stojadinovic (rajkosto) Rajko Stojadinovic (rajkosto)
Yuki-nyan Sander0542
xrossb xrossb
Yuki-nyan