BTEmu: Make m_WiiMotes private
We can already utilize the public interface to access the necessary instance without exposing a private data member.
This commit is contained in:
parent
bdfc6de9fd
commit
2b60fe684c
|
@ -57,13 +57,14 @@ public:
|
||||||
|
|
||||||
bool RemoteDisconnect(u16 _connectionHandle);
|
bool RemoteDisconnect(u16 _connectionHandle);
|
||||||
|
|
||||||
std::vector<WiimoteDevice> m_WiiMotes;
|
|
||||||
WiimoteDevice* AccessWiiMote(const bdaddr_t& _rAddr);
|
WiimoteDevice* AccessWiiMote(const bdaddr_t& _rAddr);
|
||||||
WiimoteDevice* AccessWiiMote(u16 _ConnectionHandle);
|
WiimoteDevice* AccessWiiMote(u16 _ConnectionHandle);
|
||||||
|
|
||||||
void DoState(PointerWrap& p) override;
|
void DoState(PointerWrap& p) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
std::vector<WiimoteDevice> m_WiiMotes;
|
||||||
|
|
||||||
bdaddr_t m_ControllerBD{{0x11, 0x02, 0x19, 0x79, 0x00, 0xff}};
|
bdaddr_t m_ControllerBD{{0x11, 0x02, 0x19, 0x79, 0x00, 0xff}};
|
||||||
|
|
||||||
// this is used to trigger connecting via ACL
|
// this is used to trigger connecting via ACL
|
||||||
|
|
|
@ -915,7 +915,7 @@ void WiimoteDevice::ReceiveL2capData(u16 scid, const void* data, u32 size)
|
||||||
namespace Core
|
namespace Core
|
||||||
{
|
{
|
||||||
/* This is called continuously from the Wiimote plugin as soon as it has received
|
/* This is called continuously from the Wiimote plugin as soon as it has received
|
||||||
a reporting mode. _Size is the byte size of the report. */
|
a reporting mode. size is the byte size of the report. */
|
||||||
void Callback_WiimoteInterruptChannel(int number, u16 channel_id, const void* opaque_data, u32 size)
|
void Callback_WiimoteInterruptChannel(int number, u16 channel_id, const void* opaque_data, u32 size)
|
||||||
{
|
{
|
||||||
const u8* data = (const u8*)opaque_data;
|
const u8* data = (const u8*)opaque_data;
|
||||||
|
@ -928,6 +928,6 @@ void Callback_WiimoteInterruptChannel(int number, u16 channel_id, const void* op
|
||||||
const auto bt = std::static_pointer_cast<IOS::HLE::Device::BluetoothEmu>(
|
const auto bt = std::static_pointer_cast<IOS::HLE::Device::BluetoothEmu>(
|
||||||
IOS::HLE::GetIOS()->GetDeviceByName("/dev/usb/oh1/57e/305"));
|
IOS::HLE::GetIOS()->GetDeviceByName("/dev/usb/oh1/57e/305"));
|
||||||
if (bt)
|
if (bt)
|
||||||
bt->m_WiiMotes[number].ReceiveL2capData(channel_id, opaque_data, size);
|
bt->AccessWiiMote(0x100 + number)->ReceiveL2capData(channel_id, opaque_data, size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue