Fixed device event queueing

This commit is contained in:
Travis Nickles 2018-10-15 03:01:13 -05:00
parent eb66f38167
commit 60a0f3fda0

View File

@ -1091,15 +1091,15 @@ namespace DS4Windows
error = string.Empty;
cState.CopyTo(pState);
}
lock (eventQueueLock)
{
Action tempAct = null;
for (int actInd = 0, actLen = eventQueue.Count; actInd < actLen; actInd++)
lock (eventQueueLock)
{
tempAct = eventQueue.Dequeue();
tempAct.Invoke();
Action tempAct = null;
for (int actInd = 0, actLen = eventQueue.Count; actInd < actLen; actInd++)
{
tempAct = eventQueue.Dequeue();
tempAct.Invoke();
}
}
}
}