Core/WiimoteReal: Wii remote connection pool and source change cleanup. #8548
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaced wide usages of
g_wiimote_sources
with get/set functions.Made the unnamed enum type an enum class,
WiimoteSource
.Connected real Wii remotes are now added to a "pool" when no open slot is available.
Wii remotes in the pool have LEDs 1 and 4 lit to make it apparent they are not active.
They are disconnected per normal after 5 seconds.
This allows reassigning sources and reordering remotes without the hassle of Bluetooth re-connections.
This is mainly in preparation for Wii remotes in controller interface.
My plan is an option on the Wii remote dialog, "Connect Wii Remotes for input configuration" (or something with a better name).
Enabling it will first fill any "Real" slots but additional remotes will be sent to controller interface.
Disabling the option will send spurious remotes to the pool.
I think this "pool" will make things less horrible for users that are playing around with options.
Making Wii remote connections can be not-fun, especially on Windows/macOS.
Holding on to a connection for a few seconds when between configurations will give users a better experience
Perhaps someone ambitious might make a UI for the pool.
Remotes could be identified with rumble and sent to a slot or controller interface.
This all of course only affects emulated Bluetooth.