From c4db4d02fa41a5a32f4d31cc7ada7dff46675c89 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 23 Dec 2018 08:45:03 -0600 Subject: [PATCH 01/23] 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 02/23] 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 03/23] 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 04/23] 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 05/23] 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 06/23] 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 07/23] 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 08/23] 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 09/23] 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 10/23] 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 11/23] 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 12/23] 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 +