From ffca9ec60e0372fcfb2775d33b3894a0d55f26fa Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 13 Dec 2018 03:43:28 -0600 Subject: [PATCH 01/58] Made a note about Steam now interfering with DS4Windows --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 12b88a9..fc90714 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ you've used a 360 controller before) - Bluetooth 2.1+ (via an [adapter like this](https://www.newegg.com/Product/Product.aspx?Item=N82E16833166126) or built in pc). Toshiba's adapters currently do not work. +- Disable Steam Controller Mapping support in Steam ## Device Detection Issue @@ -50,6 +51,19 @@ DualShock 4 device. Right click the device item and select "Enable device" from the menu. That will re-enable the device and be seen by applications again. +## Disable Steam Controller Mapping Support + +With recent updates to the Steam client at the time writing this (2018-12-13), +Steam has enabled Xbox Configuration Support in the Steam client by default. +What this means is that Steam will automatically map a detected Xbox 360 +controller to KB+M bindings initially (Desktop Mode) before launching Steam +Big Picture Mode or launching a game. This presents a problem for DS4Windows +since the created virtual Xbox 360 controller will be mapped to KB+M actions +for desktop mode and games launched outside of the Steam client. In order to +use DS4Windows properly, you have to open Steam Big Picture Mode, navigate to +Settings > Controller> Controller Settings and uncheck **Xbox Configuration +Support** along with **PlayStation Configuration Support**. + ## Pull Requests Pull requests for DS4Windows are welcome. Before making a pull request, please From 86fb3c2a0b67a6cb5b68e1720e8c54ea1841be38 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 13 Dec 2018 05:44:04 -0600 Subject: [PATCH 02/58] Hook log routines later in init --- DS4Windows/DS4Forms/DS4Form.cs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 8229016..a264e38 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -151,11 +151,6 @@ namespace DS4Windows blankControllerTab(); - Program.rootHub.Debug += On_Debug; - - AppLogger.GuiLog += On_Debug; - AppLogger.TrayIconLog += ShowNotification; - Directory.CreateDirectory(appdatapath); if (!Save()) //if can't write to file { @@ -254,7 +249,7 @@ namespace DS4Windows FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); string version = fvi.FileVersion; - AppLogger.LogToGui("DS4Windows version " + version, false); + LogDebug(DateTime.Now, "DS4Windows version " + version, false); LoadP(); LoadLinkedProfiles(); @@ -351,8 +346,6 @@ namespace DS4Windows } } - TaskRunner.Run(() => { UpdateTheUpdater(); }); - StartWindowsCheckBox.CheckedChanged += new EventHandler(StartWindowsCheckBox_CheckedChanged); new ToolTip().SetToolTip(StartWindowsCheckBox, Properties.Resources.RunAtStartup); @@ -399,8 +392,17 @@ namespace DS4Windows this.Resize += Form_Resize; this.LocationChanged += TrackLocationChanged; Form_Resize(null, null); + + Program.rootHub.Debug += On_Debug; + + AppLogger.GuiLog += On_Debug; + AppLogger.TrayIconLog += ShowNotification; + if (btnStartStop.Enabled && start) - TaskRunner.Delay(50).ContinueWith((t) => this.BeginInvoke((System.Action)(() => BtnStartStop_Clicked()))); + TaskRunner.Delay(50).ContinueWith((t) => { + UpdateTheUpdater(); + this.BeginInvoke((System.Action)(() => BtnStartStop_Clicked())); + }); } private void populateHoverTextDict() From b28a6cb446dcc50ac234778fccc65c151b8406e2 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 13 Dec 2018 05:55:38 -0600 Subject: [PATCH 03/58] Moved updating updater call --- DS4Windows/DS4Forms/DS4Form.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index a264e38..854cc83 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -398,11 +398,17 @@ namespace DS4Windows AppLogger.GuiLog += On_Debug; AppLogger.TrayIconLog += ShowNotification; + TaskRunner.Delay(50).ContinueWith((t) => + { + UpdateTheUpdater(); + }); + if (btnStartStop.Enabled && start) + { TaskRunner.Delay(50).ContinueWith((t) => { - UpdateTheUpdater(); this.BeginInvoke((System.Action)(() => BtnStartStop_Clicked())); }); + } } private void populateHoverTextDict() From f7da78090ff652dc1f72ec5cb4b23e75b6a88f81 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 13 Dec 2018 13:49:46 -0600 Subject: [PATCH 04/58] Make sure to add timer stop when event is called I know that I added the call at some point during testing before. --- DS4Windows/DS4Forms/DS4Form.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 854cc83..487435c 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -556,6 +556,8 @@ namespace DS4Windows void Hotkeys(object sender, EventArgs e) { + hotkeysTimer.Stop(); + if (SwipeProfiles) { for (int i = 0; i < 4; i++) @@ -607,6 +609,8 @@ namespace DS4Windows private void CheckAutoProfiles(object sender, EventArgs e) { + autoProfilesTimer.Stop(); + //Check for process for auto profiles if (string.IsNullOrEmpty(tempProfileProgram)) { From f6bb47451ecfadbc4ae5c72267bdf7272da61a59 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 13 Dec 2018 14:53:49 -0600 Subject: [PATCH 05/58] Moved linked profiles loading further in init --- DS4Windows/DS4Forms/DS4Form.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 487435c..73beee8 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -252,7 +252,6 @@ namespace DS4Windows LogDebug(DateTime.Now, "DS4Windows version " + version, false); LoadP(); - LoadLinkedProfiles(); Global.BatteryStatusChange += BatteryStatusUpdate; Global.ControllerRemoved += ControllerRemovedChange; @@ -397,6 +396,7 @@ namespace DS4Windows AppLogger.GuiLog += On_Debug; AppLogger.TrayIconLog += ShowNotification; + LoadLinkedProfiles(); TaskRunner.Delay(50).ContinueWith((t) => { From 4d5ff945d8befd48fdcd60e4c9bcb9fa9c7675e1 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 14 Dec 2018 01:45:05 -0600 Subject: [PATCH 06/58] Make WebClient instance local --- DS4Windows/DS4Forms/DS4Form.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 73beee8..f7f0149 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -37,7 +37,6 @@ namespace DS4Windows private ToolStripMenuItem[] shortcuts; private ToolStripMenuItem[] disconnectShortcuts; protected CheckBox[] linkedProfileCB; - WebClient wc = new WebClient(); NonFormTimer hotkeysTimer = new NonFormTimer(); NonFormTimer autoProfilesTimer = new NonFormTimer(); string tempProfileProgram = string.Empty; @@ -292,6 +291,7 @@ namespace DS4Windows if (checkwhen > 0 && DateTime.Now >= LastChecked + TimeSpan.FromHours(checkwhen)) { + WebClient wc = new WebClient(); wc.DownloadFileAsync(url, appdatapath + "\\version.txt"); wc.DownloadFileCompleted += (sender, e) => { TaskRunner.Run(() => Check_Version(sender, e)); }; LastChecked = DateTime.Now; From c2d26f30ce68dc13d38d2dd373706914126d2032 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 14 Dec 2018 02:04:45 -0600 Subject: [PATCH 07/58] Make sure to not show main window if app should start minimized Not a great fix. Related to issue #514. --- DS4Windows/DS4Forms/DS4Form.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index f7f0149..7fea5d9 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -390,7 +390,8 @@ namespace DS4Windows instance = this; this.Resize += Form_Resize; this.LocationChanged += TrackLocationChanged; - Form_Resize(null, null); + if (!(StartMinimized || mini)) + Form_Resize(null, null); Program.rootHub.Debug += On_Debug; From d54f449b02d6b610c11a645ba357caa847028f0e Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 14 Dec 2018 03:54:26 -0600 Subject: [PATCH 08/58] Experiment with new enhanced precision values --- DS4Windows/DS4Control/Mapping.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index b4f7219..aa4b0f8 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -839,28 +839,28 @@ namespace DS4Windows if (absX <= 0.4) { - outputX = 0.545 * absX; + outputX = 0.544 * absX; } else if (absX <= 0.75) { - outputX = absX - 0.182; + outputX = absX - 0.1824; } else if (absX > 0.75) { - outputX = (absX * 1.728) - 0.728; + outputX = (absX * 1.7296) - 0.7296; } if (absY <= 0.4) { - outputY = 0.545 * absY; + outputY = 0.544 * absY; } else if (absY <= 0.75) { - outputY = absY - 0.182; + outputY = absY - 0.1824; } else if (absY > 0.75) { - outputY = (absY * 1.728) - 0.728; + outputY = (absY * 1.7296) - 0.7296; } dState.RX = (byte)(outputX * signX * 127.5 + 127.5); From bd2a2fe4f05ca0875b13ed6c01f354b8c26c5cc6 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 14 Dec 2018 05:08:32 -0600 Subject: [PATCH 09/58] Lowered mouse stick offset --- DS4Windows/DS4Control/Mapping.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index aa4b0f8..facecb4 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -166,7 +166,7 @@ namespace DS4Windows public static int prevmouseaccel = 0; private static double horizontalRemainder = 0.0, verticalRemainder = 0.0; private const int MOUSESPEEDFACTOR = 48; - private const double MOUSESTICKOFFSET = 0.049; + private const double MOUSESTICKOFFSET = 0.048; public static void Commit(int device) { From 1019790e25ecb6b1e2b711054eb66c6efdddaed3 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 14 Dec 2018 05:40:20 -0600 Subject: [PATCH 10/58] Revert mouse stick offset --- DS4Windows/DS4Control/Mapping.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index facecb4..aa4b0f8 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -166,7 +166,7 @@ namespace DS4Windows public static int prevmouseaccel = 0; private static double horizontalRemainder = 0.0, verticalRemainder = 0.0; private const int MOUSESPEEDFACTOR = 48; - private const double MOUSESTICKOFFSET = 0.048; + private const double MOUSESTICKOFFSET = 0.049; public static void Commit(int device) { From 59dbee7c35fa5bc4f95d195fbe75fffb1a5eb9d9 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 15 Dec 2018 12:26:52 -0600 Subject: [PATCH 11/58] Use current enhanced precision settings for LS --- DS4Windows/DS4Control/Mapping.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index aa4b0f8..b98d700 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -779,28 +779,28 @@ namespace DS4Windows if (absX <= 0.4) { - outputX = 0.54 * absX; + outputX = 0.544 * absX; } else if (absX <= 0.75) { - outputX = absX - 0.184; + outputX = absX - 0.1824; } else if (absX > 0.75) { - outputX = (absX * 1.736) - 0.736; + outputX = (absX * 1.7296) - 0.7296; } if (absY <= 0.4) { - outputY = 0.54 * absY; + outputY = 0.544 * absY; } else if (absY <= 0.75) { - outputY = absY - 0.184; + outputY = absY - 0.1824; } else if (absY > 0.75) { - outputY = (absY * 1.736) - 0.736; + outputY = (absY * 1.7296) - 0.7296; } dState.LX = (byte)(outputX * signX * 127.5 + 127.5); From de601582629e452cab46585a66c67a4ecab545c3 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 15 Dec 2018 12:31:07 -0600 Subject: [PATCH 12/58] Version 1.5.19 --- DS4Windows/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index c9c88e6..2a2b621 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.18")] -[assembly: AssemblyFileVersion("1.5.18")] +[assembly: AssemblyVersion("1.5.19")] +[assembly: AssemblyFileVersion("1.5.19")] [assembly: NeutralResourcesLanguage("en")] From accd6c01d69e298cdad5234de027b46068918637 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Mon, 17 Dec 2018 21:19:18 -0600 Subject: [PATCH 13/58] Fixes invalid string compare. Just check if both strings are the same now --- DS4Windows/DS4Forms/DS4Form.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 7fea5d9..1b7fa66 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -760,14 +760,14 @@ namespace DS4Windows FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); string version = fvi.FileVersion; string newversion = File.ReadAllText(appdatapath + "\\version.txt").Trim(); - if (version.Replace(',', '.').CompareTo(newversion) == -1) + if (version.Replace(',', '.').CompareTo(newversion) != 0) { if ((DialogResult)this.Invoke(new Func(() => { return MessageBox.Show(Properties.Resources.DownloadVersion.Replace("*number*", newversion), Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question); })) == DialogResult.Yes) { if (!File.Exists(exepath + "\\DS4Updater.exe") || (File.Exists(exepath + "\\DS4Updater.exe") - && (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo("1.1.0.0") == -1))) + && (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo("1.1.0.0") != 0))) { Uri url2 = new Uri($"http://23.239.26.40/ds4windows/files/{updaterExe}"); WebClient wc2 = new WebClient(); @@ -2077,7 +2077,7 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); string version2 = fvi.FileVersion; string newversion2 = File.ReadAllText(appdatapath + "\\version.txt").Trim(); - if (version2.Replace(',', '.').CompareTo(newversion2) == -1) + if (version2.Replace(',', '.').CompareTo(newversion2) != 0) { if ((DialogResult)this.Invoke(new Func(() => { @@ -2086,7 +2086,7 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question })) == DialogResult.Yes) { if (!File.Exists(exepath + "\\DS4Updater.exe") || (File.Exists(exepath + "\\DS4Updater.exe") - && (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo(UPDATER_VERSION) == -1))) + && (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo(UPDATER_VERSION) != 0))) { Uri url2 = new Uri($"http://23.239.26.40/ds4windows/files/{updaterExe}"); WebClient wc2 = new WebClient(); From a52008cb5318f7bba9b3095d58b2da3893d22c58 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 18 Dec 2018 13:36:35 -0600 Subject: [PATCH 14/58] Version 1.5.20 --- DS4Windows/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index 2a2b621..a8e0fb2 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.19")] -[assembly: AssemblyFileVersion("1.5.19")] +[assembly: AssemblyVersion("1.5.20")] +[assembly: AssemblyFileVersion("1.5.20")] [assembly: NeutralResourcesLanguage("en")] From f642371e4de7d8fce8bbac725c2715d99d5e7d24 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Tue, 18 Dec 2018 15:54:09 -0600 Subject: [PATCH 15/58] Version 1.6.0 --- DS4Windows/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index a8e0fb2..d00ff11 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.20")] -[assembly: AssemblyFileVersion("1.5.20")] +[assembly: AssemblyVersion("1.6.0")] +[assembly: AssemblyFileVersion("1.6.0")] [assembly: NeutralResourcesLanguage("en")] From 8be9e66f22c0502ef40f1ac9fd30ba8de31daef6 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 22 Dec 2018 16:41:36 -0600 Subject: [PATCH 16/58] Change priority of bus thread. Lower priority seems better --- DS4Windows/DS4Control/ControlService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Control/ControlService.cs b/DS4Windows/DS4Control/ControlService.cs index 2b425de..3bb0c16 100644 --- a/DS4Windows/DS4Control/ControlService.cs +++ b/DS4Windows/DS4Control/ControlService.cs @@ -147,7 +147,7 @@ namespace DS4Windows Monitor.Wait(busThrLck); } }); - tempThread.Priority = ThreadPriority.AboveNormal; + tempThread.Priority = ThreadPriority.Normal; tempThread.IsBackground = true; tempThread.Start(); //while (_udpServer == null) From c4db4d02fa41a5a32f4d31cc7ada7dff46675c89 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 23 Dec 2018 08:45:03 -0600 Subject: [PATCH 17/58] Reference new updater version --- DS4Windows/DS4Forms/DS4Form.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 1b7fa66..39954e4 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -63,7 +63,7 @@ namespace DS4Windows { "DS4Windows v" + FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion, string.Empty, string.Empty, string.Empty, string.Empty }; - private const string UPDATER_VERSION = "1.2.8.0"; + private const string UPDATER_VERSION = "1.2.9.0"; private const int WM_QUERYENDSESSION = 0x11; private const int WM_CLOSE = 0x10; internal string updaterExe = Environment.Is64BitProcess ? "DS4Updater.exe" : "DS4Updater_x86.exe"; @@ -767,7 +767,7 @@ namespace DS4Windows Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question); })) == DialogResult.Yes) { if (!File.Exists(exepath + "\\DS4Updater.exe") || (File.Exists(exepath + "\\DS4Updater.exe") - && (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo("1.1.0.0") != 0))) + && (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo(UPDATER_VERSION) != 0))) { Uri url2 = new Uri($"http://23.239.26.40/ds4windows/files/{updaterExe}"); WebClient wc2 = new WebClient(); From 730cbbec29c8e55144433bdc2c5c5bcb2c200062 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 23 Dec 2018 19:53:13 -0600 Subject: [PATCH 18/58] Now target C# 7.2 --- DS4Windows/DS4Windows.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Windows.csproj b/DS4Windows/DS4Windows.csproj index 207e232..97c2f12 100644 --- a/DS4Windows/DS4Windows.csproj +++ b/DS4Windows/DS4Windows.csproj @@ -82,7 +82,7 @@ MinimumRecommendedRules.ruleset WIN64 On - 6 + 7.2 false true 1 From 8ae68ed7cf283d68ad7b3e2b4ae57fd345aa6856 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 23 Dec 2018 19:53:52 -0600 Subject: [PATCH 19/58] Use SuppressUnmanagedCodeSecurity attr for InputMethods class --- DS4Windows/DS4Control/InputMethods.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DS4Windows/DS4Control/InputMethods.cs b/DS4Windows/DS4Control/InputMethods.cs index 0d0555e..f5190b3 100644 --- a/DS4Windows/DS4Control/InputMethods.cs +++ b/DS4Windows/DS4Control/InputMethods.cs @@ -1,8 +1,10 @@ using System; using System.Runtime.InteropServices; +using System.Security; namespace DS4Windows { + [SuppressUnmanagedCodeSecurity] class InputMethods { public static void MoveCursorBy(int x, int y) From 2d9f3f424cd2af028f12de8aad571cff9d38cee2 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Mon, 24 Dec 2018 09:07:14 -0600 Subject: [PATCH 20/58] Version 1.6.1 --- DS4Windows/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index d00ff11..b2e1f43 100644 --- a/DS4Windows/Properties/AssemblyInfo.cs +++ b/DS4Windows/Properties/AssemblyInfo.cs @@ -33,7 +33,7 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.0")] -[assembly: AssemblyFileVersion("1.6.0")] +[assembly: AssemblyVersion("1.6.1")] +[assembly: AssemblyFileVersion("1.6.1")] [assembly: NeutralResourcesLanguage("en")] From 83dae66bacaf60b7f249dffda44ff19c23c161cc Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Mon, 24 Dec 2018 09:15:32 -0600 Subject: [PATCH 21/58] Use C# 7.2 for x86 build --- DS4Windows/DS4Windows.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Windows.csproj b/DS4Windows/DS4Windows.csproj index 97c2f12..85f5b3a 100644 --- a/DS4Windows/DS4Windows.csproj +++ b/DS4Windows/DS4Windows.csproj @@ -107,7 +107,7 @@ none MinimumRecommendedRules.ruleset true - 6 + 7.2 On true 1 From 23a25bc504823e5ea357bf76b42d87b2b0dbd6e7 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 26 Dec 2018 22:27:01 -0600 Subject: [PATCH 22/58] Raised number of ticks possible for analog mouse wheel Related to issue #518. --- DS4Windows/DS4Control/Mapping.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index b98d700..c6840ab 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -2466,7 +2466,7 @@ namespace DS4Windows if (now >= oldnow + TimeSpan.FromMilliseconds(10) && !pressagain) { oldnow = now; - InputMethods.MouseWheel((int)(getByteMapping(device, control, cState, eState, tp) / 51f * (down ? -1 : 1)), 0); + InputMethods.MouseWheel((int)(getByteMapping(device, control, cState, eState, tp) / 1.5f * (down ? -1 : 1)), 0); } } From e570c1c89ef17a0e793f09178e3014797123ce80 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 26 Dec 2018 23:33:38 -0600 Subject: [PATCH 23/58] Added info for Scuf Vantage gamepad Related to issue #524 --- DS4Windows/DS4Library/DS4Devices.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DS4Windows/DS4Library/DS4Devices.cs b/DS4Windows/DS4Library/DS4Devices.cs index 0193032..afbbeec 100644 --- a/DS4Windows/DS4Library/DS4Devices.cs +++ b/DS4Windows/DS4Library/DS4Devices.cs @@ -42,7 +42,8 @@ namespace DS4Windows new VidPidInfo(NACON_VID, 0x0D01), new VidPidInfo(NACON_VID, 0x0D02), new VidPidInfo(HORI_VID, 0x00EE), // Hori PS4 Mini Wired Gamepad - new VidPidInfo(0x7545, 0x0104) + new VidPidInfo(0x7545, 0x0104), + new VidPidInfo(0x2E95, 0x7725), }; private static string devicePathToInstanceId(string devicePath) From 6156d66ffbcd9cd46a9e2c4b18698514deba0762 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Wed, 26 Dec 2018 23:38:37 -0600 Subject: [PATCH 24/58] Added comment noting Scuf Vantage entry --- DS4Windows/DS4Library/DS4Devices.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Library/DS4Devices.cs b/DS4Windows/DS4Library/DS4Devices.cs index afbbeec..09c4a53 100644 --- a/DS4Windows/DS4Library/DS4Devices.cs +++ b/DS4Windows/DS4Library/DS4Devices.cs @@ -43,7 +43,7 @@ namespace DS4Windows new VidPidInfo(NACON_VID, 0x0D02), new VidPidInfo(HORI_VID, 0x00EE), // Hori PS4 Mini Wired Gamepad new VidPidInfo(0x7545, 0x0104), - new VidPidInfo(0x2E95, 0x7725), + new VidPidInfo(0x2E95, 0x7725), // Scuf Vantage gamepad }; private static string devicePathToInstanceId(string devicePath) From 5d88d9f54a6788b4d866d75c9a6a144a0beb3b40 Mon Sep 17 00:00:00 2001 From: Jarno Date: Thu, 27 Dec 2018 10:00:04 +0100 Subject: [PATCH 25/58] Change initial text --- DS4Windows/DS4Forms/DS4Form.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/DS4Form.resx b/DS4Windows/DS4Forms/DS4Form.resx index a1f161f..c921cda 100644 --- a/DS4Windows/DS4Forms/DS4Form.resx +++ b/DS4Windows/DS4Forms/DS4Form.resx @@ -418,7 +418,7 @@ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - DS4 Xinput Tool + DS4Windows True From 676ddea44261bfe560b95f2bfef9349a1f9d0e89 Mon Sep 17 00:00:00 2001 From: Jarno Date: Thu, 27 Dec 2018 10:02:05 +0100 Subject: [PATCH 26/58] Shorten tooltip char limit code Also removes unnecessary comments --- DS4Windows/DS4Forms/DS4Form.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 39954e4..53e7103 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -1163,7 +1163,7 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question string temp = Program.rootHub.getShortDS4ControllerInfo(i); if (temp != Properties.Resources.NoneText) { - notifyText[i + 1] = (i + 1) + ": " + temp; // Carefully stay under the 63 character limit. + notifyText[i + 1] = (i + 1) + ": " + temp; } else { @@ -1179,7 +1179,7 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question string temp = Program.rootHub.getShortDS4ControllerInfo(index); if (temp != Properties.Resources.NoneText) { - notifyText[index + 1] = (index + 1) + ": " + temp; // Carefully stay under the 63 character limit. + notifyText[index + 1] = (index + 1) + ": " + temp; } else { @@ -1195,14 +1195,11 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question string temp = notifyText[i]; if (!string.IsNullOrEmpty(temp)) { - tooltip += "\n" + notifyText[i]; // Carefully stay under the 63 character limit. + tooltip += "\n" + notifyText[i]; } } - if (tooltip.Length > 63) - notifyIcon1.Text = tooltip.Substring(0, 63); - else - notifyIcon1.Text = tooltip; + notifyIcon1.Text = tooltip.Length > 63 ? tooltip.Substring(0, 63) : tooltip; // Carefully stay under the 63 character limit. } protected void DeviceSerialChanged(object sender, SerialChangeArgs args) From 19b440af97f56495990a320113148b474f450937 Mon Sep 17 00:00:00 2001 From: Jarno Date: Thu, 27 Dec 2018 10:03:53 +0100 Subject: [PATCH 27/58] Populate tooltip text on start This adds version info to tooltip on app start, even if there are no controllers connected --- DS4Windows/DS4Forms/DS4Form.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 53e7103..7f48315 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -183,6 +183,7 @@ namespace DS4Windows cBUseWhiteIcon.Checked = UseWhiteIcon; Icon = Properties.Resources.DS4W; notifyIcon1.Icon = UseWhiteIcon ? Properties.Resources.DS4W___White : Properties.Resources.DS4W; + populateNotifyText(); foreach (ToolStripMenuItem t in shortcuts) t.DropDownItemClicked += Profile_Changed_Menu; From bb09eba9dbe5a4a19517cd5a9b014b01e64af35c Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 28 Dec 2018 17:51:45 -0600 Subject: [PATCH 28/58] Add newest.txt file generation to post-build step Related to issue #531. --- DS4Windows/DS4Windows.csproj | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/DS4Windows/DS4Windows.csproj b/DS4Windows/DS4Windows.csproj index 85f5b3a..bdbae9e 100644 --- a/DS4Windows/DS4Windows.csproj +++ b/DS4Windows/DS4Windows.csproj @@ -1172,7 +1172,19 @@ + + + + + + + + + + $(PostBuildEventDependsOn); + PostBuildMacros; + rem Copy compiled l18n assemblies to alt folder GOTO END if not exist $(TargetDir)Lang mkdir $(TargetDir)Lang @@ -1184,7 +1196,10 @@ for %25%25l in (%25langs%25) do ( xcopy $(TargetDir)%25%25l $(TargetDir)Lang\%25%25l\ /s /y ) -:END +echo @(VersionNumber)> $(ProjectDir)\newest.txt + +:END +