mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-25 02:36:53 +01:00
Added extra delay for ViGEm stop
This commit is contained in:
parent
1fd423b663
commit
71ceae1e0c
@ -718,6 +718,7 @@ namespace DS4Windows
|
||||
|
||||
LogDebug("Closing connection to ViGEmBus");
|
||||
|
||||
bool anyUnplugged = false;
|
||||
for (int i = 0, arlength = DS4Controllers.Length; i < arlength; i++)
|
||||
{
|
||||
DS4Device tempDevice = DS4Controllers[i];
|
||||
@ -757,6 +758,7 @@ namespace DS4Windows
|
||||
if (tempout != null)
|
||||
{
|
||||
UnplugOutDev(i, tempDevice, true);
|
||||
anyUnplugged = true;
|
||||
}
|
||||
|
||||
//outputDevices[i] = null;
|
||||
@ -787,6 +789,11 @@ namespace DS4Windows
|
||||
Thread.SpinWait(500);
|
||||
}
|
||||
|
||||
if (anyUnplugged)
|
||||
{
|
||||
Thread.Sleep(OutputSlotManager.DELAY_TIME);
|
||||
}
|
||||
|
||||
stopViGEm();
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ namespace DS4Windows
|
||||
{
|
||||
public class OutputSlotManager
|
||||
{
|
||||
private const int DELAY_TIME = 500; // measured in ms
|
||||
public const int DELAY_TIME = 500; // measured in ms
|
||||
|
||||
private Dictionary<int, OutputDevice> deviceDict = new Dictionary<int, OutputDevice>();
|
||||
private Dictionary<OutputDevice, int> revDeviceDict = new Dictionary<OutputDevice, int>();
|
||||
|
Loading…
Reference in New Issue
Block a user