mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 19:14:20 +01:00
Changed thread affinity of ControlService instance
Seems to help. Only tested with Gex so far using KB emulation. Need to try some other games
This commit is contained in:
parent
67430aa18d
commit
d7f74815e1
@ -102,7 +102,8 @@ namespace DS4Windows
|
|||||||
|
|
||||||
//if (mutex.WaitOne(TimeSpan.Zero, true))
|
//if (mutex.WaitOne(TimeSpan.Zero, true))
|
||||||
//{
|
//{
|
||||||
rootHub = new ControlService();
|
createControlService();
|
||||||
|
//rootHub = new ControlService();
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
Application.Run(new DS4Form(args));
|
Application.Run(new DS4Form(args));
|
||||||
@ -116,6 +117,16 @@ namespace DS4Windows
|
|||||||
threadComEvent.Close();
|
threadComEvent.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void createControlService()
|
||||||
|
{
|
||||||
|
Thread temp = new Thread(() => { rootHub = new ControlService(); });
|
||||||
|
temp.Priority = ThreadPriority.Normal;
|
||||||
|
temp.IsBackground = true;
|
||||||
|
temp.Start();
|
||||||
|
while (temp.IsAlive)
|
||||||
|
Thread.SpinWait(500);
|
||||||
|
}
|
||||||
|
|
||||||
private static void CreateTempWorkerThread()
|
private static void CreateTempWorkerThread()
|
||||||
{
|
{
|
||||||
testThread = new Thread(singleAppComThread_DoWork);
|
testThread = new Thread(singleAppComThread_DoWork);
|
||||||
|
Loading…
Reference in New Issue
Block a user