FLM: Changed application priority to above normal, and ThreadLoop priority to highest to make the controller app more responsive.

This commit is contained in:
General4878 2025-12-28 17:10:32 +01:00
parent abbe6094f3
commit 68b620971f
2 changed files with 15 additions and 0 deletions

View file

@ -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;

View file

@ -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();