mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-03 20:24:14 +02:00
Use designated constructors
This commit is contained in:
@@ -385,7 +385,8 @@ void BluetoothRealDevice::TriggerSyncButtonHeldEvent()
|
||||
void BluetoothRealDevice::SendHCIResetCommand()
|
||||
{
|
||||
INFO_LOG_FMT(IOS_WIIMOTE, "SendHCIResetCommand");
|
||||
m_lib_usb_bt_adapter->SendControlTransfer(Common::AsU8Span(hci_cmd_hdr_t{HCI_CMD_RESET, 0}));
|
||||
m_lib_usb_bt_adapter->SendControlTransfer(
|
||||
Common::AsU8Span(hci_cmd_hdr_t{.opcode = HCI_CMD_RESET, .length = 0}));
|
||||
}
|
||||
|
||||
void BluetoothRealDevice::SendHCIDeleteLinkKeyCommand()
|
||||
@@ -412,7 +413,7 @@ bool BluetoothRealDevice::SendHCIStoreLinkKeyCommand()
|
||||
|
||||
struct Payload
|
||||
{
|
||||
hci_cmd_hdr_t header{HCI_CMD_WRITE_STORED_LINK_KEY};
|
||||
hci_cmd_hdr_t header{.opcode = HCI_CMD_WRITE_STORED_LINK_KEY};
|
||||
hci_write_stored_link_key_cp command{};
|
||||
struct LinkKey
|
||||
{
|
||||
@@ -443,7 +444,7 @@ void BluetoothRealDevice::FakeVendorCommandReply(u16 opcode, USB::V0IntrMessage&
|
||||
|
||||
struct Payload
|
||||
{
|
||||
hci_event_hdr_t header{HCI_EVENT_COMMAND_COMPL};
|
||||
hci_event_hdr_t header{.event = HCI_EVENT_COMMAND_COMPL};
|
||||
hci_command_compl_ep command{};
|
||||
} payload;
|
||||
|
||||
@@ -460,7 +461,7 @@ void BluetoothRealDevice::FakeVendorCommandReply(u16 opcode, USB::V0IntrMessage&
|
||||
|
||||
void BluetoothRealDevice::FakeSyncButtonEvent(USB::V0IntrMessage& ctrl, std::span<const u8> payload)
|
||||
{
|
||||
const hci_event_hdr_t hci_event{HCI_EVENT_VENDOR, u8(payload.size())};
|
||||
const hci_event_hdr_t hci_event{.event = HCI_EVENT_VENDOR, .length = u8(payload.size())};
|
||||
|
||||
auto& memory = GetSystem().GetMemory();
|
||||
|
||||
|
||||
@@ -521,8 +521,9 @@ bool InitializeRealtekBluetoothDevice(LibUSBBluetoothAdapter& adapter)
|
||||
{
|
||||
// Read local version.
|
||||
hci_read_local_ver_rp local_ver{};
|
||||
if (!adapter.SendBlockingCommand(Common::AsU8Span(hci_cmd_hdr_t{HCI_CMD_READ_LOCAL_VER, 0}),
|
||||
Common::AsWritableU8Span(local_ver)))
|
||||
if (!adapter.SendBlockingCommand(
|
||||
Common::AsU8Span(hci_cmd_hdr_t{.opcode = HCI_CMD_READ_LOCAL_VER, .length = 0}),
|
||||
Common::AsWritableU8Span(local_ver)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -585,7 +586,7 @@ bool InitializeRealtekBluetoothDevice(LibUSBBluetoothAdapter& adapter)
|
||||
|
||||
// Read ROM version.
|
||||
rtl_rom_version_evt read_rom_ver{};
|
||||
if (!adapter.SendBlockingCommand(Common::AsU8Span(hci_cmd_hdr_t{0xfc6d, 0}),
|
||||
if (!adapter.SendBlockingCommand(Common::AsU8Span(hci_cmd_hdr_t{.opcode = 0xfc6d, .length = 0}),
|
||||
Common::AsWritableU8Span(read_rom_ver)))
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user