Skip to content
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

Merged
merged 6 commits into from Jun 30, 2021

Conversation

OatmealDome
Copy link
Member

  • Minor clean up on WiimoteScannerDarwin.
  • Moved IOBluetoothHostController initialization to the constructor.
  • Used defaultController to get an instance of IOBluetoothHostController instead of creating one manually ([[IOBluetoothHostController alloc] init] is not mentioned anywhere in documentation, seems to work by coincidence).
  • Removes a hack that only applies to old macOS SDKs.
  • Fixes a potential issue where Wiimote scanning would continue even if [IOBluetoothDeviceInquiry start] returns an error.
  • Fixes Dolphin hanging on quit if Continuous Scanning is enabled and no Wiimote was ever connected. (#12424)

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.

[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;
Copy link
Member Author

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.

@JMC47
Copy link
Contributor

JMC47 commented Jun 24, 2021

@dolphin-emu-bot rebuild

@MayImilae
Copy link
Contributor

Oh wow, this addresses a lot of very old bugs! I'll test this soon.

@OatmealDome
Copy link
Member Author

OK, I think I fixed lint issues.

(If there's more macOS bugs/issues feel free to ping btw)

@MayImilae
Copy link
Contributor

MayImilae commented Jun 26, 2021

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:
MacBook Pro 13in mid-2018 with Touch Bar
macOS 11.2.2
Core i7-8559U @ 4.5ghz
Intel Iris Plus Graphics 655
16GB 2133MHz LPDDR3

@JMC47
Copy link
Contributor

JMC47 commented Jun 30, 2021

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.

@JMC47 JMC47 merged commit 6a46d35 into dolphin-emu:master Jun 30, 2021
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants