From 39762a361a9e4436da9290f925f563e5ce45dd00 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Fri, 17 Aug 2018 15:11:46 -0500 Subject: [PATCH] Delay execution of service start --- 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 0cb547b..8edb4cf 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -275,9 +275,6 @@ namespace DS4Windows hotkeysTimer.Start(); } - if (btnStartStop.Enabled && start) - BtnStartStop_Clicked(); - startToolStripMenuItem.Text = btnStartStop.Text; cBoxNotifications.SelectedIndex = Notifications; cBSwipeProfiles.Checked = SwipeProfiles; @@ -398,6 +395,9 @@ namespace DS4Windows control.MouseHover += ClearLastMessage; } } + + if (btnStartStop.Enabled && start) + TaskRunner.Delay(10).ContinueWith((t) => this.BeginInvoke((System.Action)(() => BtnStartStop_Clicked()))); } private void populateHoverTextDict()