From 68b620971f0a596101f2c40a9b798545c9adce0f Mon Sep 17 00:00:00 2001 From: General4878 Date: Sun, 28 Dec 2025 17:10:32 +0100 Subject: [PATCH] FLM: Changed application priority to above normal, and ThreadLoop priority to highest to make the controller app more responsive. --- SteamController/ContextThread.cs | 7 +++++++ SteamController/Program.cs | 8 ++++++++ 2 files changed, 15 insertions(+) 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();