mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-22 21:21:17 +01:00
Take out async keyword from hotplug routine. Delegate to different thread.
Further testing should be done to make sure there are no regressions.
This commit is contained in:
parent
644c674a27
commit
33966389a4
@ -1002,7 +1002,8 @@ namespace DS4Windows
|
||||
|
||||
if (!inHotPlug)
|
||||
{
|
||||
InnerHotplug2();
|
||||
inHotPlug = true;
|
||||
System.Threading.Tasks.Task.Run(() => { InnerHotplug2(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1017,7 +1018,7 @@ namespace DS4Windows
|
||||
catch { }
|
||||
}
|
||||
|
||||
protected async void InnerHotplug2()
|
||||
protected void InnerHotplug2()
|
||||
{
|
||||
inHotPlug = true;
|
||||
System.Threading.SynchronizationContext uiContext =
|
||||
@ -1030,7 +1031,8 @@ namespace DS4Windows
|
||||
|
||||
while (loopHotplug == true)
|
||||
{
|
||||
await System.Threading.Tasks.Task.Run(() => { Program.rootHub.HotPlug(uiContext); });
|
||||
Program.rootHub.HotPlug(uiContext);
|
||||
//System.Threading.Tasks.Task.Run(() => { Program.rootHub.HotPlug(uiContext); });
|
||||
lock (hotplugCounterLock)
|
||||
{
|
||||
hotplugCounter--;
|
||||
|
Loading…
x
Reference in New Issue
Block a user