From 7e124e169eddb8453a1973b351ab76bd6ea9a515 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 1 May 2020 18:28:06 +0300 Subject: [PATCH] Avoid races --- JoyKit/JOYController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/JoyKit/JOYController.m b/JoyKit/JOYController.m index 92662ad..0d88f28 100644 --- a/JoyKit/JOYController.m +++ b/JoyKit/JOYController.m @@ -703,6 +703,7 @@ typedef struct __attribute__((packed)) { _forceStopPWMThread = true; } [_rumblePWMThreadLock unlock]; + while (_rumblePWMThreadRunning); } + (void)controllerAdded:(IOHIDDeviceRef) device