From 268d8d5541b12bd0272d7513ffd478d972b3243d Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 5 Jul 2019 15:22:57 -0500 Subject: [PATCH 1/6] Add wait period while suspending --- DS4Windows/DS4Forms/DS4Form.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 13eee39..ec66be2 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -583,6 +583,11 @@ namespace DS4Windows.Forms Program.rootHub.suspending = true; this.Invoke((System.Action)(() => BtnStartStop_Clicked())); wasrunning = true; + + while (this.changingService) + { + Thread.SpinWait(500); + } } break; From e3dc5d660be76d882ca1c3b6e6e105b5fd50810f Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 6 Jul 2019 03:11:50 -0500 Subject: [PATCH 2/6] Updated TODO file --- TODO.md | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO.md b/TODO.md index dda3a25..c9ae7f9 100644 --- a/TODO.md +++ b/TODO.md @@ -2,6 +2,7 @@ * Add cross dead zone (per axis) for sticks * Add more curve options +* Transition to use Visual Studio 2019 * ~~Re-evaluate HidGuardian~~ * ~~Move forms to new namespace~~ * ~~Finalize DS4 Emulation~~ From 3efb0fdc42b147c005489133cf7800c06b716327 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 6 Jul 2019 03:12:03 -0500 Subject: [PATCH 3/6] Updated newest file --- DS4Windows/newest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/newest.txt b/DS4Windows/newest.txt index 8f8b3f7..e6a68e9 100644 --- a/DS4Windows/newest.txt +++ b/DS4Windows/newest.txt @@ -1 +1 @@ -1.7.11 +1.7.12 From 9ff137ae928b28487b4c4c064b315ba22d84bcc5 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 6 Jul 2019 03:12:15 -0500 Subject: [PATCH 4/6] Version 1.7.12 --- 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 8cce04e..609191f 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.7.11")] -[assembly: AssemblyFileVersion("1.7.11")] +[assembly: AssemblyVersion("1.7.12")] +[assembly: AssemblyFileVersion("1.7.12")] [assembly: NeutralResourcesLanguage("en")] From 7a2224f109886012f66c9b67181372e561088779 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 6 Jul 2019 03:37:32 -0500 Subject: [PATCH 5/6] Added Kamilczak020 as a contributor --- contributors.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/contributors.txt b/contributors.txt index ebf5444..dbb77b6 100644 --- a/contributors.txt +++ b/contributors.txt @@ -4,6 +4,7 @@ Korney Czukowski (czukowski) DandelionSprout jdfeng justalemon +Kamilczak020 mika-n Rajko Stojadinovic (rajkosto) Sander0542 From 1eac0f9dd5922a580e12f88a3a96a43102b7cbc6 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Mon, 8 Jul 2019 00:32:31 -0500 Subject: [PATCH 6/6] Should fix updater not getting invoked for version checker Related to issue #751 --- DS4Windows/DS4Forms/DS4Form.cs | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index ec66be2..4890870 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -802,12 +802,14 @@ namespace DS4Windows.Forms FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); string version = fvi.FileVersion; string newversion = File.ReadAllText(appdatapath + "\\version.txt").Trim(); + bool launchUpdate = false; if (!string.IsNullOrWhiteSpace(newversion) && 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) { + launchUpdate = true; if (!File.Exists(exepath + "\\DS4Updater.exe") || (File.Exists(exepath + "\\DS4Updater.exe") && (FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileVersion.CompareTo(UPDATER_VERSION) != 0))) { @@ -816,21 +818,26 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question if (appdatapath == exepath) { wc2.DownloadFile(url2, exepath + "\\DS4Updater.exe"); - Process p = new Process(); - p.StartInfo.FileName = exepath + "\\DS4Updater.exe"; - p.StartInfo.Arguments = "-autolaunch"; - if (AdminNeeded()) - p.StartInfo.Verb = "runas"; - - try { p.Start(); Close(); } - catch { } } else { this.BeginInvoke((System.Action)(() => MessageBox.Show(Properties.Resources.PleaseDownloadUpdater))); Process.Start($"https://github.com/Ryochan7/DS4Updater/releases/download/v{UPDATER_VERSION}/{updaterExe}"); + launchUpdate = false; } } + + if (launchUpdate) + { + Process p = new Process(); + p.StartInfo.FileName = exepath + "\\DS4Updater.exe"; + p.StartInfo.Arguments = "-autolaunch"; + if (AdminNeeded()) + p.StartInfo.Verb = "runas"; + + try { p.Start(); Close(); } + catch { } + } } else File.Delete(appdatapath + "\\version.txt");