fix El Capitan WiimoteReal pairing problem and refresh crash problem

This commit is contained in:
Pal Lockheart 2016-01-27 02:07:36 +08:00
parent 437b3db88e
commit ea44e0e3ba
1 changed files with 2 additions and 1 deletions

View File

@ -169,7 +169,8 @@ void WiimoteScanner::FindWiimotes(std::vector<Wiimote*> & 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)
{