diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 0cccb58..19e2fd2 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -645,6 +645,7 @@ namespace DS4Windows.Forms short evType = Convert.ToInt16(e.NewEvent.GetPropertyValue("EventType")); switch (evType) { + // Wakeup from Suspend case 7: { if (btnStartStop.Text == Properties.Resources.StartText && wasrunning) @@ -652,12 +653,27 @@ namespace DS4Windows.Forms DS4LightBar.shuttingdown = false; wasrunning = false; Program.rootHub.suspending = false; - Thread.Sleep(8000); - this.Invoke((System.Action)(() => BtnStartStop_Clicked())); + Thread.Sleep(16000); + //this.Invoke((System.Action)(() => BtnStartStop_Clicked())); + changingService = true; + SynchronizationContext uiContext = null; + Invoke((System.Action)(() => { + uiContext = SynchronizationContext.Current; + btnStartStop.Enabled = false; + })); + + Program.rootHub.Start(uiContext); + + Invoke((System.Action)(() => { + ServiceStartupFinish(); + })); + + changingService = false; } break; } + // Entering Suspend case 4: { if (btnStartStop.Text == Properties.Resources.StopText) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index 05aec77..0ef6383 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.13")] -[assembly: AssemblyFileVersion("1.7.13")] +[assembly: AssemblyVersion("1.7.14")] +[assembly: AssemblyFileVersion("1.7.14")] [assembly: NeutralResourcesLanguage("en")] diff --git a/DS4Windows/newest.txt b/DS4Windows/newest.txt index 36c5cb9..68ced4b 100644 --- a/DS4Windows/newest.txt +++ b/DS4Windows/newest.txt @@ -1 +1 @@ -1.7.13 +1.7.14