mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 23:11:14 +01:00
Merge pull request #7106 from lioncash/name
WiimoteDevice: Amend variable naming
This commit is contained in:
commit
f3a18db9e0
File diff suppressed because it is too large
Load Diff
@ -23,34 +23,34 @@ class BluetoothEmu;
|
|||||||
class WiimoteDevice
|
class WiimoteDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WiimoteDevice(Device::BluetoothEmu* _pHost, int _Number, bdaddr_t _BD, bool ready = false);
|
WiimoteDevice(Device::BluetoothEmu* host, int number, bdaddr_t bd, bool ready = false);
|
||||||
|
|
||||||
void DoState(PointerWrap& p);
|
void DoState(PointerWrap& p);
|
||||||
|
|
||||||
// ugly Host handling....
|
// ugly Host handling....
|
||||||
// we really have to clean all this code
|
// we really have to clean all this code
|
||||||
|
|
||||||
bool IsConnected() const { return m_ConnectionState == ConnectionState::Complete; }
|
bool IsConnected() const { return m_connection_state == ConnectionState::Complete; }
|
||||||
bool IsInactive() const { return m_ConnectionState == ConnectionState::Inactive; }
|
bool IsInactive() const { return m_connection_state == ConnectionState::Inactive; }
|
||||||
bool LinkChannel();
|
bool LinkChannel();
|
||||||
void ResetChannels();
|
void ResetChannels();
|
||||||
void Activate(bool ready);
|
void Activate(bool ready);
|
||||||
void ExecuteL2capCmd(u8* _pData, u32 _Size); // From CPU
|
void ExecuteL2capCmd(u8* ptr, u32 size); // From CPU
|
||||||
void ReceiveL2capData(u16 scid, const void* _pData, u32 _Size); // From Wiimote
|
void ReceiveL2capData(u16 scid, const void* data, u32 size); // From Wiimote
|
||||||
|
|
||||||
void EventConnectionAccepted();
|
void EventConnectionAccepted();
|
||||||
void EventDisconnect();
|
void EventDisconnect();
|
||||||
bool EventPagingChanged(u8 page_mode) const;
|
bool EventPagingChanged(u8 page_mode) const;
|
||||||
|
|
||||||
const bdaddr_t& GetBD() const { return m_BD; }
|
const bdaddr_t& GetBD() const { return m_bd; }
|
||||||
const uint8_t* GetClass() const { return uclass; }
|
const u8* GetClass() const { return m_uclass; }
|
||||||
u16 GetConnectionHandle() const { return m_ConnectionHandle; }
|
u16 GetConnectionHandle() const { return m_connection_handle; }
|
||||||
const u8* GetFeatures() const { return features; }
|
const u8* GetFeatures() const { return m_features; }
|
||||||
const char* GetName() const { return m_Name.c_str(); }
|
const char* GetName() const { return m_name.c_str(); }
|
||||||
u8 GetLMPVersion() const { return lmp_version; }
|
u8 GetLMPVersion() const { return m_lmp_version; }
|
||||||
u16 GetLMPSubVersion() const { return lmp_subversion; }
|
u16 GetLMPSubVersion() const { return m_lmp_subversion; }
|
||||||
u16 GetManufactorID() const { return 0x000F; } // Broadcom Corporation
|
u16 GetManufactorID() const { return 0x000F; } // Broadcom Corporation
|
||||||
const u8* GetLinkKey() const { return m_LinkKey; }
|
const u8* GetLinkKey() const { return m_link_key; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class ConnectionState
|
enum class ConnectionState
|
||||||
@ -69,58 +69,58 @@ private:
|
|||||||
bool config_wait = false;
|
bool config_wait = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
ConnectionState m_ConnectionState;
|
ConnectionState m_connection_state;
|
||||||
|
|
||||||
HIDChannelState m_hid_control_channel;
|
HIDChannelState m_hid_control_channel;
|
||||||
HIDChannelState m_hid_interrupt_channel;
|
HIDChannelState m_hid_interrupt_channel;
|
||||||
|
|
||||||
// STATE_TO_SAVE
|
// STATE_TO_SAVE
|
||||||
bdaddr_t m_BD;
|
bdaddr_t m_bd;
|
||||||
u16 m_ConnectionHandle;
|
u16 m_connection_handle;
|
||||||
uint8_t uclass[HCI_CLASS_SIZE];
|
u8 m_uclass[HCI_CLASS_SIZE];
|
||||||
u8 features[HCI_FEATURES_SIZE];
|
u8 m_features[HCI_FEATURES_SIZE];
|
||||||
u8 lmp_version;
|
u8 m_lmp_version;
|
||||||
u16 lmp_subversion;
|
u16 m_lmp_subversion;
|
||||||
u8 m_LinkKey[HCI_KEY_SIZE];
|
u8 m_link_key[HCI_KEY_SIZE];
|
||||||
std::string m_Name;
|
std::string m_name;
|
||||||
Device::BluetoothEmu* m_pHost;
|
Device::BluetoothEmu* m_host;
|
||||||
|
|
||||||
struct SChannel
|
struct SChannel
|
||||||
{
|
{
|
||||||
u16 SCID;
|
u16 scid;
|
||||||
u16 DCID;
|
u16 dcid;
|
||||||
u16 PSM;
|
u16 psm;
|
||||||
|
|
||||||
u16 MTU;
|
u16 mtu;
|
||||||
u16 FlushTimeOut;
|
u16 flush_time_out;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<u32, SChannel> CChannelMap;
|
typedef std::map<u32, SChannel> CChannelMap;
|
||||||
CChannelMap m_Channel;
|
CChannelMap m_channel;
|
||||||
|
|
||||||
bool DoesChannelExist(u16 scid) const { return m_Channel.find(scid) != m_Channel.end(); }
|
bool DoesChannelExist(u16 scid) const { return m_channel.find(scid) != m_channel.end(); }
|
||||||
void SendCommandToACL(u8 _Ident, u8 _Code, u8 _CommandLength, u8* _pCommandData);
|
void SendCommandToACL(u8 ident, u8 code, u8 command_length, u8* command_data);
|
||||||
|
|
||||||
void SignalChannel(u8* _pData, u32 _Size);
|
void SignalChannel(u8* data, u32 size);
|
||||||
|
|
||||||
void SendConnectionRequest(u16 _SCID, u16 _PSM);
|
void SendConnectionRequest(u16 scid, u16 psm);
|
||||||
void SendConfigurationRequest(u16 _SCID, u16 _pMTU = 0, u16 _pFlushTimeOut = 0);
|
void SendConfigurationRequest(u16 scid, u16 mtu = 0, u16 flush_time_out = 0);
|
||||||
void SendDisconnectRequest(u16 _SCID);
|
void SendDisconnectRequest(u16 scid);
|
||||||
|
|
||||||
void ReceiveConnectionReq(u8 _Ident, u8* _pData, u32 _Size);
|
void ReceiveConnectionReq(u8 ident, u8* data, u32 size);
|
||||||
void ReceiveConnectionResponse(u8 _Ident, u8* _pData, u32 _Size);
|
void ReceiveConnectionResponse(u8 ident, u8* data, u32 size);
|
||||||
void ReceiveDisconnectionReq(u8 _Ident, u8* _pData, u32 _Size);
|
void ReceiveDisconnectionReq(u8 ident, u8* data, u32 size);
|
||||||
void ReceiveConfigurationReq(u8 _Ident, u8* _pData, u32 _Size);
|
void ReceiveConfigurationReq(u8 ident, u8* data, u32 size);
|
||||||
void ReceiveConfigurationResponse(u8 _Ident, u8* _pData, u32 _Size);
|
void ReceiveConfigurationResponse(u8 ident, u8* data, u32 size);
|
||||||
|
|
||||||
// some new ugly stuff
|
// some new ugly stuff
|
||||||
// should be inside the plugin
|
// should be inside the plugin
|
||||||
void HandleSDP(u16 _SCID, u8* _pData, u32 _Size);
|
void HandleSDP(u16 cid, u8* data, u32 size);
|
||||||
void SDPSendServiceSearchResponse(u16 _SCID, u16 _TransactionID, u8* _pServiceSearchPattern,
|
void SDPSendServiceSearchResponse(u16 cid, u16 transaction_id, u8* service_search_pattern,
|
||||||
u16 _MaximumServiceRecordCount);
|
u16 maximum_service_record_count);
|
||||||
|
|
||||||
void SDPSendServiceAttributeResponse(u16 _SCID, u16 TransactionID, u32 _ServiceHandle,
|
void SDPSendServiceAttributeResponse(u16 cid, u16 transaction_id, u32 service_handle,
|
||||||
u16 _StartAttrID, u16 _EndAttrID,
|
u16 start_attr_id, u16 end_attr_id,
|
||||||
u16 _MaximumAttributeByteCount, u8* _pContinuationState);
|
u16 maximum_attribute_byte_count, u8* continuation_state);
|
||||||
};
|
};
|
||||||
} // namespace IOS::HLE
|
} // namespace IOS::HLE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user