mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-10-22 02:28:59 +02:00
Move the Wiimote connect code out of Host
I don't know who thought it would be a good idea to put the Wiimote connect code as part of the Host interface, and have that called from both the UI code and the core. And then hack around it by having "force connect" events whenever Host_ConnectWiimote is called from the core...
This commit is contained in:
1 parent
9237137c3a
commit
ee868e2362
14 files changed
+42
-114
No files matched your search
@@ -22,12 +22,9 @@
|
||||
#include "Core/BootManager.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/HW/Wiimote.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/IOS/IOS.h"
|
||||
#include "Core/IOS/STM/STM.h"
|
||||
#include "Core/IOS/USB/Bluetooth/BTEmu.h"
|
||||
#include "Core/IOS/USB/Bluetooth/WiimoteDevice.h"
|
||||
#include "Core/State.h"
|
||||
|
||||
#include "UICommon/CommandLineParse.h"
|
||||
@@ -131,22 +128,6 @@ bool Host_RendererIsFullscreen()
|
||||
return rendererIsFullscreen;
|
||||
}
|
||||
|
||||
void Host_ConnectWiimote(int wm_idx, bool connect)
|
||||
{
|
||||
Core::QueueHostJob([=] {
|
||||
const auto ios = IOS::HLE::GetIOS();
|
||||
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"));
|
||||
if (bt)
|
||||
bt->AccessWiiMote(wm_idx | 0x100)->Activate(connect);
|
||||
Host_UpdateMainFrame();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
void Host_ShowVideoConfig(void*, const std::string&)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user