-
Notifications
You must be signed in to change notification settings - Fork 2.9k
WiimoteReal: Windows improvements. #13970
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
base: master
Are you sure you want to change the base?
Conversation
7c78534 to
74e8778
Compare
|
The last version of the Toshiba Bluetooth stack was released in 2011, it's not available from Toshiba anymore and I highly doubt it works on Windows 10+, which is the minimum we require for Dolphin nowadays. With that said, I think it's safe to drop workarounds for it... |
|
Will test later and report back. About this // When pressing the sync button, the remote expects the host's mac as the pass key. I think in both cases the mac (Wiimote or host) needs to be in backward order. Just for keeping the code nicely explained. |
|
Some things I noticed. Only tested with nsmb. Still takes some time to dolphin realize a wiimote was turned off. Seems unpredictable the time. But kind of works. Until you get the wiimote disconnected message, obviously wont reconnect. After the message will reconnect fine. When using just 1 player on nsmb, wiimote 2 will be disconnected by emulated software (4 leds will stay on) which is correct, but when going back to dolphin UI will still show 4 leds on and wont get player led until launching a game, we can improve this. Reconnecting them on dolphin UI without launching games at all was partially possible, they reconnect, but no player led is assigned until a game is launched (they keep blinking until a game is launched) All those test were made with continuous scan enabled. Will share more discoveries, but it`s looking good. |
I am someone who used (and technically still uses) a bluetooth dongle compatible with the Toshiba Stack. I hunted down an Azio BTD-V201 specifically for the better bluetooth connectivity and support for -TR Wii Remotes back in the Windows 7 days. But I no longer use the Toshiba Stack, since it was a nightmare to use and Windows 8 made the windows bluetooth stack less terrible, enough that the now minor benefit of the Toshiba Stack wasn't worth it. Fortunately my Azio BTD-V201 supported bluetooth passthrough so I'm still using it to this day as a bluetooth passthrough adapter. I imagine most people who used to use the Toshiba Stack are in a similar position to me. The Toshiba Stack hadn't been updated for years when I purchased mine in 2013 and I highly doubt you can find a device that shipped with it in the past decade, so, I extremely doubt anyone is using it still. Even if they are, they should have moved on to something else by this point. I am totally ok with you removing a workaround for it, especially when many easier and better options exist. |
Yeah, for whatever reason, it seems like detecting a disconnect is not possible until performing a write, which we currently wait for the game to do. The situation could definitely still be improved.
Bluetooth MACs are usually stored in an order reverse from display order, so it's "normal" order, but I'll make that clear in the comment.
When I experience this sort of situation, I find it's usually from one of the various Wii remote threads deadlocking with another. I don't think it's strictly related to the Wii remote communication. It seems this is an existing issue. |
|
Continuous scan is similar to Windows BT searching for devices mode? I noticed some BT dongles while are searching for devices, they take a good hit in performance (ie. headset could skip audio while on this mode). If continuous scan do the same, could be a performance improvement if we could get rid of this for reconnecting purposes. I tested both nonTR and TR and they work pretty good. All functions are ok. Dolphin no more deleting them from system. Although didnt test sync capabilities. |
Ideally just the final step would happen repeatedly, then we could detect re-connections without Bluetooth inquiries. |
…having to use the Refresh button.
74e8778 to
0c40abb
Compare
|
Update: Disconnects are now detected in about one second. I've disabled SDL's DirectInput handling for now to work around deadlocks. |
|
Lot of improvements. Will report back later. BTW anyone has a tplink ub500? Im almost sure wiimotes wont reconnect with that dongle. Dont know what realtek messed there, since it's 8761B based. Wonder if the problem affects other 8761B based like the asus one among others. I had a talk with them and after many debug info they sent me a working driver. But never make it to public release. In case you find some weird troubles with that one, just let me know. I dont know where I left the ub500 to test it again. |
Majorly overhauled the Windows Wii remote code.
Statically link with "Bthprops.lib"
Dynamic linking was introduced in 3acf0eb to make Dolphin run under Wine.
My search results imply that Wine has long since added stubs for these functions so I'm hoping it works fine now?
I'll change it back if not.
edit: Wine seems to work fine.
A 10 year old comment describes a workaround needed for the Toshiba Bluetooth stack.
I've removed the workaround.
Removed
HidP_SetOutputReportfallback (Windows 7 workaround).Fixed buggy overlapped Read/Write event usage (probably my fault from long ago).
Added checks for a Wii remote device name on the HID interface to only attempt connecting to actual Wii remotes devices.
The existing code just throws Wii remote data at every interface and checks for sane replies.
Added a periodic write to test for disconnected remotes in a timely manner.
Changed the
Refreshbutton to not remove authenticated remotes.Some users found it annoying.
It now only removes unauthenticated disconnected remotes.
Added

SyncandResetactions to establish and remove pairings.The
Refreshbutton is now aQToolButtonwith additional actions (only on Windows).Pairing a remote with the
Syncbutton will enable it to reestablish a connection on any button press.The UX still needs improvements.
The buttons block the UI and It's really not clear what's going on behind the scenes unless you watch the logs.
I plan to rectify this.
RefreshorContinuous Scanningare no longer required to connect paired remotes.Pairing with Windows or the DolphinBar "just works" by assigning a slot to
Real Wii Remote.Additionally, I am constantly bombarded with ControllerInterface / WiimotePool related deadlocks.
This seems like an existing issue that fixing properly is probably going to take another PR.
It seems like it's SDL?
I've disabled SDL's DirectInput handling for now.
This PR still needs some work but maybe some people would like to do some testing. :)
TODO for this PR: