From 7eb86cdb67031f103434afc384fba7e98f84adbd Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 20 Jun 2018 15:27:31 -0400 Subject: 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. --- Source/Core/DolphinQt2/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/DolphinQt2/MainWindow.cpp') 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->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); }); } -- cgit v1.2.3