From 78383a77e673de0bb65d42a4d73b92823a96c316 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 11 Aug 2018 01:22:33 -0500 Subject: [PATCH] Delay port change for when checkbox gets unchecked --- DS4Windows/DS4Forms/DS4Form.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 4552ae9..4a7dd6c 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -2587,8 +2587,12 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question private async void WaitUDPPortChange() { - await TaskRunner.Run(() => Program.rootHub.UseUDPPort()); - nUDUdpPortNum.Enabled = true; + await TaskRunner.Delay(100); + if (isUsingUDPServer()) + { + await TaskRunner.Run(() => Program.rootHub.UseUDPPort()); + nUDUdpPortNum.Enabled = true; + } } private void cBFlashWhenLate_CheckedChanged(object sender, EventArgs e)