diff options
| author | JMC47 <JMC4789@gmail.com> | 2020-09-14 02:09:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-14 02:09:27 -0400 |
| commit | 4f1f849c9d7db042726fd2dd5effafcb434bbcec (patch) | |
| tree | f0bcf8b53b58dbe0d012c4b7cc496b0704e9dbe7 /Source/Core/DolphinQt/MainWindow.cpp | |
| parent | eae68194b30610c60f224c676f573de024ed3a78 (diff) | |
| parent | 0ad123bdbb935a2a3a7de8d26f15e406a690781e (diff) | |
Merge pull request #8985 from jordan-woyak/btemu-cleanup
BTEmu/Wiimote: Fixes and Cleanups.
Diffstat (limited to 'Source/Core/DolphinQt/MainWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/MainWindow.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index db18ec8a02..4e654c8b64 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -1706,10 +1706,12 @@ void MainWindow::OnConnectWiiRemote(int id) if (!ios || SConfig::GetInstance().m_bt_passthrough_enabled) return; Core::RunAsCPUThread([&] { - const auto bt = std::static_pointer_cast<IOS::HLE::Device::BluetoothEmu>( - ios->GetDeviceByName("/dev/usb/oh1/57e/305")); - const bool is_connected = bt && bt->AccessWiimoteByIndex(id)->IsConnected(); - Wiimote::Connect(id, !is_connected); + if (const auto bt = std::static_pointer_cast<IOS::HLE::Device::BluetoothEmu>( + ios->GetDeviceByName("/dev/usb/oh1/57e/305"))) + { + const auto wm = bt->AccessWiimoteByIndex(id); + wm->Activate(!wm->IsConnected()); + } }); } |
