From 3e217266c5900a2503380ceaa1205f58b1e16a29 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 24 Aug 2017 21:50:03 -0500 Subject: [PATCH] Remove unnecessary async call. Run in different thread --- DS4Windows/DS4Forms/DS4Form.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 790b52b..a5e09c5 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -414,7 +414,7 @@ namespace DS4Windows } } - UpdateTheUpdater(); + System.Threading.Tasks.Task.Run(() => { UpdateTheUpdater(); }); this.StartWindowsCheckBox.CheckedChanged += new EventHandler(this.StartWindowsCheckBox_CheckedChanged); new ToolTip().SetToolTip(StartWindowsCheckBox, Properties.Resources.RunAtStartup); @@ -484,14 +484,14 @@ namespace DS4Windows tLPControllers.Visible = !nocontrollers; } - private async void UpdateTheUpdater() + private void UpdateTheUpdater() { if (File.Exists(exepath + "\\Update Files\\DS4Updater.exe")) { Process[] processes = Process.GetProcessesByName("DS4Updater"); while (processes.Length > 0) { - await System.Threading.Tasks.Task.Delay(500); + System.Threading.Thread.Sleep(500); } File.Delete(exepath + "\\DS4Updater.exe");