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

BTEmu/Wiimote: Fixes and Cleanups. #8985

Merged
merged 5 commits into from Sep 14, 2020

Conversation

jordan-woyak
Copy link
Member

@jordan-woyak jordan-woyak commented Jul 26, 2020

Cleaned up L2CAP channel establishment in WiimoteDevice.
When the ACL connection originates from the Wii it will establish HID channel connections but our WiimoteDevice was simultaneously doing so causing problems.
ACL connection establishment is less hacky now as well.

Cleaned up our "fake" inquiry response in BTEmu.
There were a few issues there.
Now only configured remotes will respond to an inquiry.

All of that fixes Wii remote reconnection in the home menu (issue: https://bugs.dolphin-emu.org/issues/11974)
image

Reconciled some duplicate HID logic in Emu and Real Wiimote code.
Introduced a HIDWiimote interface for WiimoteDevice to talk to either a real or emulated source.

General cleanups in related code.

Eliminated remnants of the Wii Remote "Plugin".

Advanced save state version due to cleanups.

Any TODOs I've added are things I plan to address in later PRs.
I've already made this PR too big.

@jordan-woyak jordan-woyak force-pushed the btemu-cleanup branch 2 times, most recently from 2c91e70 to a06fb15 Compare July 26, 2020 03:54
@iwubcode
Copy link
Contributor

iwubcode commented Jul 26, 2020

Nice work!

Could be placebo but Bully Scholarship Edition seems to load a lot more quickly now with emulated Wiimotes when compared with master (though there's likely still an emulation issue with this game as GPU usage stays at 100% while the initial loading occurs)

Source/Core/Core/HW/WiimoteCommon/WiimoteConstants.h Outdated Show resolved Hide resolved
Source/Core/Core/HW/WiimoteCommon/WiimoteHid.h Outdated Show resolved Hide resolved
Source/Core/Core/HW/WiimoteCommon/WiimoteHid.h Outdated Show resolved Hide resolved
Source/Core/Core/IOS/USB/Bluetooth/BTEmu.cpp Outdated Show resolved Hide resolved
@jordan-woyak jordan-woyak force-pushed the btemu-cleanup branch 2 times, most recently from 2d9d6f5 to 93632bd Compare July 26, 2020 16:07
Copy link
Member

@BhaaLseN BhaaLseN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, untested.

Source/Core/Core/IOS/USB/Bluetooth/BTEmu.cpp Outdated Show resolved Hide resolved
Source/Core/Core/IOS/USB/Bluetooth/BTEmu.cpp Outdated Show resolved Hide resolved
Source/Core/Core/IOS/USB/Bluetooth/BTEmu.cpp Outdated Show resolved Hide resolved
@jordan-woyak jordan-woyak force-pushed the btemu-cleanup branch 5 times, most recently from 632536e to e1c18f3 Compare August 2, 2020 15:28
@jordan-woyak jordan-woyak force-pushed the btemu-cleanup branch 2 times, most recently from 1a9dd1a to 1e29e99 Compare August 16, 2020 14:49
@JMC47
Copy link
Contributor

JMC47 commented Sep 13, 2020

I tested this out last night to make sure I could connect my controllers still and it worked.

@JMC47 JMC47 merged commit 4f1f849 into dolphin-emu:master Sep 14, 2020
10 checks passed
@jordan-woyak jordan-woyak deleted the btemu-cleanup branch January 23, 2021 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants