mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 06:29:00 +01:00
-[deviceInquiryComplete:error:aborted:] comes in on the main thread in macOS 10.13, so instead of using CFRunLoopRun()/CFRunLoopStop(), just let the run loop do one pass. This is already in a loop waiting for done to be false. This also means -[deviceInquiryComplete:error:aborted:] should no longer call CFRunLoopStop(). Fixes connecting to Wiimotes in macOS 10.13+, should continue to work as before in 10.12 and below.
This commit is contained in:
parent
8bcc392d5d
commit
d306397bbc
@ -54,7 +54,7 @@ void WiimoteScannerDarwin::FindWiimotes(std::vector<Wiimote*>& found_wiimotes,
|
||||
|
||||
do
|
||||
{
|
||||
CFRunLoopRun();
|
||||
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false);
|
||||
} while (!sbt->done);
|
||||
|
||||
int found_devices = [[bti foundDevices] count];
|
||||
@ -255,7 +255,6 @@ void WiimoteDarwin::DisablePowerAssertionInternal()
|
||||
aborted:(BOOL)aborted
|
||||
{
|
||||
done = true;
|
||||
CFRunLoopStop(CFRunLoopGetCurrent());
|
||||
}
|
||||
|
||||
- (void)deviceInquiryDeviceFound:(IOBluetoothDeviceInquiry*)sender device:(IOBluetoothDevice*)device
|
||||
|
Loading…
x
Reference in New Issue
Block a user