mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 15:41:49 +01:00
Remove use of WaitHandle
This commit is contained in:
parent
40341ac709
commit
4cfbc098b0
@ -139,12 +139,13 @@ namespace DS4Windows
|
|||||||
|
|
||||||
private static void singleAppComThread_DoWork()
|
private static void singleAppComThread_DoWork()
|
||||||
{
|
{
|
||||||
WaitHandle[] waitHandles = new WaitHandle[] { threadComEvent };
|
//WaitHandle[] waitHandles = new WaitHandle[] { threadComEvent };
|
||||||
|
|
||||||
while (!exitComThread)
|
while (!exitComThread)
|
||||||
{
|
{
|
||||||
// check every second for a signal.
|
// check every second for a signal.
|
||||||
if (WaitHandle.WaitAny(waitHandles) == 0)
|
//if (WaitHandle.WaitAny(waitHandles) == 0)
|
||||||
|
if (threadComEvent.WaitOne())
|
||||||
{
|
{
|
||||||
threadComEvent.Reset();
|
threadComEvent.Reset();
|
||||||
// The user tried to start another instance. We can't allow that,
|
// The user tried to start another instance. We can't allow that,
|
||||||
|
Loading…
Reference in New Issue
Block a user