diff --git a/DS4Windows/DS4Forms/DS4Form.cs b/DS4Windows/DS4Forms/DS4Form.cs index 17b1a85..d88aff4 100644 --- a/DS4Windows/DS4Forms/DS4Form.cs +++ b/DS4Windows/DS4Forms/DS4Form.cs @@ -290,6 +290,7 @@ namespace DS4Windows autoProfilesTimer.Elapsed += CheckAutoProfiles; autoProfilesTimer.Interval = 1000; + autoProfilesTimer.AutoReset = false; FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); string version = fvi.FileVersion; @@ -310,6 +311,7 @@ namespace DS4Windows btnStartStop.Text = Properties.Resources.StartText; hotkeysTimer.Elapsed += Hotkeys; + hotkeysTimer.AutoReset = false; if (SwipeProfiles) { hotkeysTimer.Start(); @@ -600,6 +602,8 @@ namespace DS4Windows bat = null; runningBat = false; } + + hotkeysTimer.Start(); } private void CheckAutoProfiles(object sender, EventArgs e) @@ -676,6 +680,7 @@ namespace DS4Windows } } + autoProfilesTimer.Start(); //GC.Collect(); } @@ -926,14 +931,14 @@ Properties.Resources.DS4Update, MessageBoxButtons.YesNo, MessageBoxIcon.Question protected void Form_Resize(object sender, EventArgs e) { bool minToTask = GetMinToTaskbar(); - if (FormWindowState.Minimized == WindowState && minToTask) + if (FormWindowState.Minimized == WindowState && !minToTask) { Hide(); ShowInTaskbar = false; FormBorderStyle = FormBorderStyle.None; } - else if (FormWindowState.Normal == WindowState && minToTask) + else if (FormWindowState.Normal == WindowState && !minToTask) { //mAllowVisible = true; Show(); @@ -2582,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) diff --git a/DS4Windows/Properties/AssemblyInfo.cs b/DS4Windows/Properties/AssemblyInfo.cs index 3ad4a3e..8b9d70f 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.5.3")] -[assembly: AssemblyFileVersion("1.5.3")] +[assembly: AssemblyVersion("1.5.4")] +[assembly: AssemblyFileVersion("1.5.4")] [assembly: NeutralResourcesLanguage("en")]