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