mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-23 23:21:49 +01:00
Thread priority changes
This commit is contained in:
parent
e0daa9683f
commit
c8809f37cb
@ -41,15 +41,9 @@ namespace DS4Windows
|
||||
{
|
||||
//sp.Stream = Properties.Resources.EE;
|
||||
// Cause thread affinity to not be tied to main GUI thread
|
||||
Thread x360Thread = new Thread(() => { x360Bus = new X360Device(); });
|
||||
x360Thread.IsBackground = true;
|
||||
x360Thread.Priority = ThreadPriority.Normal;
|
||||
x360Thread.Name = "SCP Virtual Bus Thread";
|
||||
x360Thread.Start();
|
||||
while (!x360Thread.ThreadState.HasFlag(ThreadState.Stopped))
|
||||
{
|
||||
Thread.SpinWait(500);
|
||||
}
|
||||
Task.Run(() => {
|
||||
Thread.CurrentThread.Priority = ThreadPriority.AboveNormal;
|
||||
x360Bus = new X360Device(); }).Wait();
|
||||
|
||||
AddtoDS4List();
|
||||
|
||||
@ -209,7 +203,6 @@ namespace DS4Windows
|
||||
}
|
||||
|
||||
runHotPlug = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -148,9 +148,7 @@ namespace DS4Windows
|
||||
new SaveWhere(false).ShowDialog();
|
||||
}
|
||||
|
||||
Thread AppCollectionThread = new Thread(() => CheckDrivers());
|
||||
AppCollectionThread.IsBackground = true;
|
||||
AppCollectionThread.Start();
|
||||
TaskRunner.Run(() => CheckDrivers());
|
||||
|
||||
if (string.IsNullOrEmpty(appdatapath))
|
||||
{
|
||||
@ -949,6 +947,7 @@ namespace DS4Windows
|
||||
var uiContext = SynchronizationContext.Current;
|
||||
TaskRunner.Run(() =>
|
||||
{
|
||||
//Thread.CurrentThread.Priority = ThreadPriority.AboveNormal;
|
||||
Program.rootHub.Start(uiContext, log);
|
||||
this.Invoke((System.Action)(() => { serviceStartupFinish(); }));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user