Merge pull request #14250 from jordan-woyak/wmreal-bb-no-pool

WiimoteReal: Immediately disconnect balance boards when disabled.
This commit is contained in:
JMC47 2026-01-17 18:16:04 -05:00 committed by GitHub
commit 581bef63be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1052,7 +1052,13 @@ void HandleWiimoteSourceChange(unsigned int index)
{
const Core::CPUThreadGuard guard(Core::System::GetInstance());
if (auto removed_wiimote = std::move(g_wiimotes[index]))
auto removed_wiimote = std::move(g_wiimotes[index]);
// The Wiimote pool isn't currently designed to handle Balance Boards.
// Refactoring will be needed to differentiate between remotes/boards.
const bool is_balance_board = index == WIIMOTE_BALANCE_BOARD;
if (removed_wiimote != nullptr && !is_balance_board)
AddWiimoteToPool(std::move(removed_wiimote));
}
g_controller_interface.PlatformPopulateDevices([] { ProcessWiimotePool(); });