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; error = string.Empty;
cState.CopyTo(pState); cState.CopyTo(pState);
}
lock (eventQueueLock) lock (eventQueueLock)
{
Action tempAct = null;
for (int actInd = 0, actLen = eventQueue.Count; actInd < actLen; actInd++)
{ {
tempAct = eventQueue.Dequeue(); Action tempAct = null;
tempAct.Invoke(); for (int actInd = 0, actLen = eventQueue.Count; actInd < actLen; actInd++)
{
tempAct = eventQueue.Dequeue();
tempAct.Invoke();
}
} }
} }
} }