diff --git a/SteamController/ContextThread.cs b/SteamController/ContextThread.cs index 0362ed8..d11c0df 100644 --- a/SteamController/ContextThread.cs +++ b/SteamController/ContextThread.cs @@ -31,6 +31,13 @@ namespace SteamController ThreadSleep((int)startDelayMs); } + //Raise the thread priority to High for better responsiveness + try + { + Thread.CurrentThread.Priority = ThreadPriority.Highest; + } + catch { } + var stopwatch = new Stopwatch(); stopwatch.Start(); int updates = 0; diff --git a/SteamController/Program.cs b/SteamController/Program.cs index f7a9798..9d7cde7 100644 --- a/SteamController/Program.cs +++ b/SteamController/Program.cs @@ -1,4 +1,5 @@ using CommonHelpers; +using System.Diagnostics; namespace SteamController { @@ -12,6 +13,13 @@ namespace SteamController { Instance.WithSentry(() => { + // Raise the application priority to Above Normal for better responsiveness + try + { + Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal; + } + catch { } + // To customize application configuration such as set high DPI settings or default font, // see https://aka.ms/applicationconfiguration. ApplicationConfiguration.Initialize();