diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-06-20 15:27:31 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-06-20 17:05:54 -0400 |
| commit | 7eb86cdb67031f103434afc384fba7e98f84adbd (patch) | |
| tree | 1d2c17823f10ca8ada2f03decd970a13d3b13fb4 /Source/Core/DolphinQt2/MainWindow.cpp | |
| parent | e4b6d7626b296ca88900f28536f8a02878422741 (diff) | |
BTEmu: Add helper function for accessing WiimoteDevice instances by index
This makes it much more straightforward to access WiimoteDevice
instances and also keeps the implementation details of accessing those
instances in one spot.
Given as all external accesses to the WiimoteDevice instances go through
this function, we can make the other two private.
Diffstat (limited to 'Source/Core/DolphinQt2/MainWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/MainWindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp index cd3be9999f..389040ae01 100644 --- a/Source/Core/DolphinQt2/MainWindow.cpp +++ b/Source/Core/DolphinQt2/MainWindow.cpp @@ -1401,7 +1401,7 @@ void MainWindow::OnConnectWiiRemote(int id) 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->AccessWiiMote(id | 0x100)->IsConnected(); + const bool is_connected = bt && bt->AccessWiiMoteByIndex(id)->IsConnected(); Wiimote::Connect(id, !is_connected); }); } |
