From ea44e0e3ba51737c4736125f67cb90ae4f59e045 Mon Sep 17 00:00:00 2001 From: Pal Lockheart Date: Wed, 27 Jan 2016 02:07:36 +0800 Subject: [PATCH] fix El Capitan WiimoteReal pairing problem and refresh crash problem --- Source/Core/Core/HW/WiimoteReal/IOdarwin.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/HW/WiimoteReal/IOdarwin.mm b/Source/Core/Core/HW/WiimoteReal/IOdarwin.mm index 4c5787f250..e6a518643e 100644 --- a/Source/Core/Core/HW/WiimoteReal/IOdarwin.mm +++ b/Source/Core/Core/HW/WiimoteReal/IOdarwin.mm @@ -169,7 +169,8 @@ void WiimoteScanner::FindWiimotes(std::vector & found_wiimotes, Wiimot @{ @kIOHIDVendorIDKey: @0x057e, @kIOHIDProductIDKey: @0x0330 }, ]; IOHIDManagerSetDeviceMatchingMultiple(hid, (CFArrayRef)criteria); - CFRunLoopRun(); + if (IOHIDManagerOpen(hid, kIOHIDOptionsTypeNone) != kIOReturnSuccess) + WARN_LOG(WIIMOTE, "Failed to open HID Manager"); CFSetRef devices = IOHIDManagerCopyDevices(hid); if (devices) {