New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WiimoteScannerDarwin: fix hang on quit and clean up #9839
Conversation
…searching stops Used by WiimoteScannerDarwin to know when to exit its runloop.
| [bti release]; | ||
| [sbt release]; | ||
| } | ||
|
|
||
| bool WiimoteScannerDarwin::IsReady() const | ||
| { | ||
| // TODO: only return true when a BT device is present | ||
| return true; | ||
| return m_host_controller != nil; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this even used? As far as I can tell, WiimoteScannerBackend::IsReady is called from WiimoteScanner::IsReady() but nothing ever calls that.
|
@dolphin-emu-bot rebuild |
|
Oh wow, this addresses a lot of very old bugs! I'll test this soon. |
|
OK, I think I fixed lint issues. (If there's more macOS bugs/issues feel free to ping btw) |
|
Tested on my MacBook. Hanging on quit with continuous scanning is fixed! Also Wii Remotes still work, though I'm pretty sure that would have been noticed if it was otherwise. I don't really play games on this enough to really comment on the stability improvements from these fixes, however I got through a full stage of Sonic Colors without difficulty, whatever that is worth. Tested on: |
|
We don't have many mac testers/maintainers, and this appears to approve the situation dramatically. Billiard did say that non-boilerplate parts of the code looked okay on IRC. |
WiimoteScannerDarwin.IOBluetoothHostControllerinitialization to the constructor.defaultControllerto get an instance ofIOBluetoothHostControllerinstead of creating one manually ([[IOBluetoothHostController alloc] init]is not mentioned anywhere in documentation, seems to work by coincidence).[IOBluetoothDeviceInquiry start]returns an error.Tested on MBP 16" (2019), macOS Big Sur 11.4, Xcode 12.5. Continuous Scanning still works and I was able to play a game of Wii Sports tennis just fine.