mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-03-15 09:24:12 +01:00
FLM: Changed application priority to above normal, and ThreadLoop priority to highest to make the controller app more responsive.
This commit is contained in:
parent
abbe6094f3
commit
68b620971f
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue