mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-23 01:39:17 +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))
|
||||
//{
|
||||
rootHub = new ControlService();
|
||||
createControlService();
|
||||
//rootHub = new ControlService();
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new DS4Form(args));
|
||||
@ -116,6 +117,16 @@ namespace DS4Windows
|
||||
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()
|
||||
{
|
||||
testThread = new Thread(singleAppComThread_DoWork);
|
||||
|
Loading…
Reference in New Issue
Block a user