mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Assert: Uppercase assertion macros
Macros should be all upper-cased. This is also kind of a wart that's been sticking out for quite a while now (we avoid prefixing underscores).
This commit is contained in:
@ -98,8 +98,8 @@ IPCCommandResult DI::IOCtlV(const IOCtlVRequest& request)
|
||||
{
|
||||
case DVDInterface::DVDLowOpenPartition:
|
||||
{
|
||||
_dbg_assert_msg_(IOS_DI, request.in_vectors[1].address == 0, "DVDLowOpenPartition with ticket");
|
||||
_dbg_assert_msg_(IOS_DI, request.in_vectors[2].address == 0,
|
||||
DEBUG_ASSERT_MSG(IOS_DI, request.in_vectors[1].address == 0, "DVDLowOpenPartition with ticket");
|
||||
DEBUG_ASSERT_MSG(IOS_DI, request.in_vectors[2].address == 0,
|
||||
"DVDLowOpenPartition with cert chain");
|
||||
|
||||
const u64 partition_offset =
|
||||
|
@ -80,7 +80,7 @@ IOCtlVRequest::IOCtlVRequest(const u32 address_) : Request(address_)
|
||||
|
||||
const IOCtlVRequest::IOVector* IOCtlVRequest::GetVector(size_t index) const
|
||||
{
|
||||
_assert_(index < (in_vectors.size() + io_vectors.size()));
|
||||
ASSERT(index < (in_vectors.size() + io_vectors.size()));
|
||||
if (index < in_vectors.size())
|
||||
return &in_vectors[index];
|
||||
return &io_vectors[index - in_vectors.size()];
|
||||
|
@ -376,7 +376,7 @@ std::vector<u8> TicketReader::GetRawTicketView(u32 ticket_num) const
|
||||
|
||||
// Copy the rest of the ticket view structure from the ticket.
|
||||
view.insert(view.end(), view_start, view_start + (sizeof(TicketView) - sizeof(version)));
|
||||
_assert_(view.size() == sizeof(TicketView));
|
||||
ASSERT(view.size() == sizeof(TicketView));
|
||||
|
||||
return view;
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ IPCCommandResult FS::GetStats(const IOCtlRequest& request)
|
||||
|
||||
IPCCommandResult FS::CreateDirectory(const IOCtlRequest& request)
|
||||
{
|
||||
_dbg_assert_(IOS_FILEIO, request.buffer_out_size == 0);
|
||||
DEBUG_ASSERT(IOS_FILEIO, request.buffer_out_size == 0);
|
||||
u32 Addr = request.buffer_in;
|
||||
|
||||
u32 OwnerID = Memory::Read_U32(Addr);
|
||||
@ -255,7 +255,7 @@ IPCCommandResult FS::CreateDirectory(const IOCtlRequest& request)
|
||||
|
||||
DirName += DIR_SEP;
|
||||
File::CreateFullPath(DirName);
|
||||
_dbg_assert_msg_(IOS_FILEIO, File::IsDirectory(DirName), "FS: CREATE_DIR %s failed",
|
||||
DEBUG_ASSERT_MSG(IOS_FILEIO, File::IsDirectory(DirName), "FS: CREATE_DIR %s failed",
|
||||
DirName.c_str());
|
||||
|
||||
return GetFSReply(IPC_SUCCESS);
|
||||
@ -301,7 +301,7 @@ IPCCommandResult FS::SetAttribute(const IOCtlRequest& request)
|
||||
|
||||
IPCCommandResult FS::GetAttribute(const IOCtlRequest& request)
|
||||
{
|
||||
_dbg_assert_msg_(IOS_FILEIO, request.buffer_out_size == 76,
|
||||
DEBUG_ASSERT_MSG(IOS_FILEIO, request.buffer_out_size == 76,
|
||||
" GET_ATTR needs an 76 bytes large output buffer but it is %i bytes large",
|
||||
request.buffer_out_size);
|
||||
|
||||
@ -377,7 +377,7 @@ IPCCommandResult FS::GetAttribute(const IOCtlRequest& request)
|
||||
|
||||
IPCCommandResult FS::DeleteFile(const IOCtlRequest& request)
|
||||
{
|
||||
_dbg_assert_(IOS_FILEIO, request.buffer_out_size == 0);
|
||||
DEBUG_ASSERT(IOS_FILEIO, request.buffer_out_size == 0);
|
||||
int Offset = 0;
|
||||
|
||||
const std::string wii_path = Memory::GetString(request.buffer_in + Offset, 64);
|
||||
@ -407,7 +407,7 @@ IPCCommandResult FS::DeleteFile(const IOCtlRequest& request)
|
||||
|
||||
IPCCommandResult FS::RenameFile(const IOCtlRequest& request)
|
||||
{
|
||||
_dbg_assert_(IOS_FILEIO, request.buffer_out_size == 0);
|
||||
DEBUG_ASSERT(IOS_FILEIO, request.buffer_out_size == 0);
|
||||
int Offset = 0;
|
||||
|
||||
const std::string wii_path = Memory::GetString(request.buffer_in + Offset, 64);
|
||||
@ -454,7 +454,7 @@ IPCCommandResult FS::RenameFile(const IOCtlRequest& request)
|
||||
|
||||
IPCCommandResult FS::CreateFile(const IOCtlRequest& request)
|
||||
{
|
||||
_dbg_assert_(IOS_FILEIO, request.buffer_out_size == 0);
|
||||
DEBUG_ASSERT(IOS_FILEIO, request.buffer_out_size == 0);
|
||||
|
||||
u32 Addr = request.buffer_in;
|
||||
u32 OwnerID = Memory::Read_U32(Addr);
|
||||
@ -600,9 +600,9 @@ IPCCommandResult FS::ReadDirectory(const IOCtlVRequest& request)
|
||||
|
||||
IPCCommandResult FS::GetUsage(const IOCtlVRequest& request)
|
||||
{
|
||||
_dbg_assert_(IOS_FILEIO, request.io_vectors.size() == 2);
|
||||
_dbg_assert_(IOS_FILEIO, request.io_vectors[0].size == 4);
|
||||
_dbg_assert_(IOS_FILEIO, request.io_vectors[1].size == 4);
|
||||
DEBUG_ASSERT(IOS_FILEIO, request.io_vectors.size() == 2);
|
||||
DEBUG_ASSERT(IOS_FILEIO, request.io_vectors[0].size == 4);
|
||||
DEBUG_ASSERT(IOS_FILEIO, request.io_vectors[1].size == 4);
|
||||
|
||||
// this command sucks because it asks of the number of used
|
||||
// fsBlocks and inodes
|
||||
|
@ -33,7 +33,7 @@ std::string BuildFilename(const std::string& wii_path)
|
||||
if (wii_path.compare(0, 1, "/") == 0)
|
||||
return nand_path + Common::EscapePath(wii_path);
|
||||
|
||||
_assert_(false);
|
||||
ASSERT(false);
|
||||
return nand_path;
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ Kernel::Kernel()
|
||||
{
|
||||
// Until the Wii root and NAND path stuff is entirely managed by IOS and made non-static,
|
||||
// using more than one IOS instance at a time is not supported.
|
||||
_assert_(GetIOS() == nullptr);
|
||||
ASSERT(GetIOS() == nullptr);
|
||||
Core::InitializeWiiRoot(false);
|
||||
m_is_responsible_for_nand_root = true;
|
||||
AddCoreDevices();
|
||||
@ -362,7 +362,7 @@ bool Kernel::BootIOS(const u64 ios_title_id, const std::string& boot_content_pat
|
||||
|
||||
void Kernel::AddDevice(std::unique_ptr<Device::Device> device)
|
||||
{
|
||||
_assert_(device->GetDeviceType() == Device::Device::DeviceType::Static);
|
||||
ASSERT(device->GetDeviceType() == Device::Device::DeviceType::Static);
|
||||
m_device_map[device->GetDeviceName()] = std::move(device);
|
||||
}
|
||||
|
||||
@ -546,7 +546,7 @@ IPCCommandResult Kernel::HandleIPCCommand(const Request& request)
|
||||
ret = device->IOCtlV(IOCtlVRequest{request.address});
|
||||
break;
|
||||
default:
|
||||
_assert_msg_(IOS, false, "Unexpected command: %x", request.command);
|
||||
ASSERT_MSG(IOS, false, "Unexpected command: %x", request.command);
|
||||
ret = Device::Device::GetDefaultReply(IPC_EINVAL);
|
||||
break;
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ ReturnCode IOSC::ImportPublicKey(Handle dest_handle, const u8* public_key,
|
||||
|
||||
if (dest_entry->subtype == SUBTYPE_RSA2048 || dest_entry->subtype == SUBTYPE_RSA4096)
|
||||
{
|
||||
_assert_(public_key_exponent);
|
||||
ASSERT(public_key_exponent);
|
||||
std::memcpy(&dest_entry->misc_data, public_key_exponent, 4);
|
||||
}
|
||||
return IPC_SUCCESS;
|
||||
@ -310,7 +310,7 @@ ReturnCode IOSC::VerifyPublicKeySign(const std::array<u8, 20>& sha1, Handle sign
|
||||
case SUBTYPE_RSA4096:
|
||||
{
|
||||
const size_t expected_key_size = entry->subtype == SUBTYPE_RSA2048 ? 0x100 : 0x200;
|
||||
_assert_(entry->data.size() == expected_key_size);
|
||||
ASSERT(entry->data.size() == expected_key_size);
|
||||
|
||||
mbedtls_rsa_context rsa;
|
||||
mbedtls_rsa_init(&rsa, MBEDTLS_RSA_PKCS_V15, 0);
|
||||
@ -569,7 +569,7 @@ void IOSC::LoadDefaultEntries(ConsoleType console_type)
|
||||
3};
|
||||
break;
|
||||
default:
|
||||
_assert_msg_(IOS, false, "Unknown console type");
|
||||
ASSERT_MSG(IOS, false, "Unknown console type");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -658,7 +658,7 @@ const IOSC::KeyEntry* IOSC::FindEntry(Handle handle, SearchMode mode) const
|
||||
|
||||
IOSC::Handle IOSC::GetHandleFromIterator(IOSC::KeyEntries::iterator iterator) const
|
||||
{
|
||||
_assert_(iterator != m_key_entries.end());
|
||||
ASSERT(iterator != m_key_entries.end());
|
||||
return static_cast<Handle>(iterator - m_key_entries.begin());
|
||||
}
|
||||
|
||||
|
@ -691,8 +691,8 @@ IPCCommandResult NetIPTop::HandleGetHostByNameRequest(const IOCtlRequest& reques
|
||||
request.buffer_out + 4);
|
||||
|
||||
// Returned struct must be ipv4.
|
||||
_assert_msg_(IOS_NET, remoteHost->h_addrtype == AF_INET && remoteHost->h_length == sizeof(u32),
|
||||
"returned host info is not IPv4");
|
||||
ASSERT_MSG(IOS_NET, remoteHost->h_addrtype == AF_INET && remoteHost->h_length == sizeof(u32),
|
||||
"returned host info is not IPv4");
|
||||
Memory::Write_U16(AF_INET, request.buffer_out + 8);
|
||||
Memory::Write_U16(sizeof(u32), request.buffer_out + 10);
|
||||
|
||||
|
@ -171,8 +171,8 @@ IPCCommandResult BluetoothEmu::IOCtlV(const IOCtlVRequest& request)
|
||||
const auto* acl_header =
|
||||
reinterpret_cast<hci_acldata_hdr_t*>(Memory::GetPointer(ctrl.data_address));
|
||||
|
||||
_dbg_assert_(IOS_WIIMOTE, HCI_BC_FLAG(acl_header->con_handle) == HCI_POINT2POINT);
|
||||
_dbg_assert_(IOS_WIIMOTE, HCI_PB_FLAG(acl_header->con_handle) == HCI_PACKET_START);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, HCI_BC_FLAG(acl_header->con_handle) == HCI_POINT2POINT);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, HCI_PB_FLAG(acl_header->con_handle) == HCI_PACKET_START);
|
||||
|
||||
SendToDevice(HCI_CON_HANDLE(acl_header->con_handle),
|
||||
Memory::GetPointer(ctrl.data_address + sizeof(hci_acldata_hdr_t)),
|
||||
@ -187,7 +187,7 @@ IPCCommandResult BluetoothEmu::IOCtlV(const IOCtlVRequest& request)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
_dbg_assert_msg_(IOS_WIIMOTE, 0, "Unknown USB::IOCTLV_USBV0_BLKMSG: %x", ctrl.endpoint);
|
||||
DEBUG_ASSERT_MSG(IOS_WIIMOTE, 0, "Unknown USB::IOCTLV_USBV0_BLKMSG: %x", ctrl.endpoint);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -203,7 +203,7 @@ IPCCommandResult BluetoothEmu::IOCtlV(const IOCtlVRequest& request)
|
||||
}
|
||||
else
|
||||
{
|
||||
_dbg_assert_msg_(IOS_WIIMOTE, 0, "Unknown USB::IOCTLV_USBV0_INTRMSG: %x", ctrl.endpoint);
|
||||
DEBUG_ASSERT_MSG(IOS_WIIMOTE, 0, "Unknown USB::IOCTLV_USBV0_INTRMSG: %x", ctrl.endpoint);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -382,7 +382,7 @@ void BluetoothEmu::ACLPool::Store(const u8* data, const u16 size, const u16 conn
|
||||
return;
|
||||
}
|
||||
|
||||
_dbg_assert_msg_(IOS_WIIMOTE, size < ACL_PKT_SIZE, "ACL packet too large for pool");
|
||||
DEBUG_ASSERT_MSG(IOS_WIIMOTE, size < ACL_PKT_SIZE, "ACL packet too large for pool");
|
||||
|
||||
m_queue.push_back(Packet());
|
||||
auto& packet = m_queue.back();
|
||||
@ -437,7 +437,7 @@ bool BluetoothEmu::SendEventInquiryResponse()
|
||||
if (m_WiiMotes.empty())
|
||||
return false;
|
||||
|
||||
_dbg_assert_(IOS_WIIMOTE, sizeof(SHCIEventInquiryResult) - 2 +
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, sizeof(SHCIEventInquiryResult) - 2 +
|
||||
(m_WiiMotes.size() * sizeof(hci_inquiry_response)) <
|
||||
256);
|
||||
|
||||
@ -701,7 +701,7 @@ bool BluetoothEmu::SendEventReadRemoteVerInfo(u16 _connectionHandle)
|
||||
|
||||
void BluetoothEmu::SendEventCommandComplete(u16 opcode, const void* data, u32 data_size)
|
||||
{
|
||||
_dbg_assert_(IOS_WIIMOTE, (sizeof(SHCIEventCommand) - 2 + data_size) < 256);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, (sizeof(SHCIEventCommand) - 2 + data_size) < 256);
|
||||
|
||||
SQueuedEvent event(sizeof(SHCIEventCommand) + data_size, 0);
|
||||
|
||||
@ -1117,7 +1117,7 @@ void BluetoothEmu::ExecuteHCICommandMessage(const USB::V0CtrlMessage& ctrl_messa
|
||||
}
|
||||
else
|
||||
{
|
||||
_dbg_assert_msg_(IOS_WIIMOTE, 0, "Unknown USB_IOCTL_CTRLMSG: 0x%04X (ocf: 0x%x ogf 0x%x)",
|
||||
DEBUG_ASSERT_MSG(IOS_WIIMOTE, 0, "Unknown USB_IOCTL_CTRLMSG: 0x%04X (ocf: 0x%x ogf 0x%x)",
|
||||
pMsg->Opcode, ocf, ogf);
|
||||
}
|
||||
break;
|
||||
|
@ -255,7 +255,7 @@ void WiimoteDevice::ExecuteL2capCmd(u8* _pData, u32 _Size)
|
||||
|
||||
default:
|
||||
{
|
||||
_dbg_assert_msg_(IOS_WIIMOTE, DoesChannelExist(pHeader->dcid),
|
||||
DEBUG_ASSERT_MSG(IOS_WIIMOTE, DoesChannelExist(pHeader->dcid),
|
||||
"L2CAP: SendACLPacket to unknown channel %i", pHeader->dcid);
|
||||
CChannelMap::iterator itr = m_Channel.find(pHeader->dcid);
|
||||
|
||||
@ -393,7 +393,7 @@ void WiimoteDevice::ReceiveConnectionResponse(u8 _Ident, u8* _pData, u32 _Size)
|
||||
{
|
||||
l2cap_con_rsp_cp* rsp = (l2cap_con_rsp_cp*)_pData;
|
||||
|
||||
_dbg_assert_(IOS_WIIMOTE, _Size == sizeof(l2cap_con_rsp_cp));
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, _Size == sizeof(l2cap_con_rsp_cp));
|
||||
|
||||
DEBUG_LOG(IOS_WIIMOTE, "[L2CAP] ReceiveConnectionResponse");
|
||||
DEBUG_LOG(IOS_WIIMOTE, " DCID: 0x%04x", rsp->dcid);
|
||||
@ -401,9 +401,9 @@ void WiimoteDevice::ReceiveConnectionResponse(u8 _Ident, u8* _pData, u32 _Size)
|
||||
DEBUG_LOG(IOS_WIIMOTE, " Result: 0x%04x", rsp->result);
|
||||
DEBUG_LOG(IOS_WIIMOTE, " Status: 0x%04x", rsp->status);
|
||||
|
||||
_dbg_assert_(IOS_WIIMOTE, rsp->result == L2CAP_SUCCESS);
|
||||
_dbg_assert_(IOS_WIIMOTE, rsp->status == L2CAP_NO_INFO);
|
||||
_dbg_assert_(IOS_WIIMOTE, DoesChannelExist(rsp->scid));
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, rsp->result == L2CAP_SUCCESS);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, rsp->status == L2CAP_NO_INFO);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, DoesChannelExist(rsp->scid));
|
||||
|
||||
SChannel& rChannel = m_Channel[rsp->scid];
|
||||
rChannel.DCID = rsp->dcid;
|
||||
@ -420,9 +420,9 @@ void WiimoteDevice::ReceiveConfigurationReq(u8 _Ident, u8* _pData, u32 _Size)
|
||||
u32 Offset = 0;
|
||||
l2cap_cfg_req_cp* pCommandConfigReq = (l2cap_cfg_req_cp*)_pData;
|
||||
|
||||
_dbg_assert_(IOS_WIIMOTE, pCommandConfigReq->flags ==
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, pCommandConfigReq->flags ==
|
||||
0x00); // 1 means that the options are send in multi-packets
|
||||
_dbg_assert_(IOS_WIIMOTE, DoesChannelExist(pCommandConfigReq->dcid));
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, DoesChannelExist(pCommandConfigReq->dcid));
|
||||
|
||||
SChannel& rChannel = m_Channel[pCommandConfigReq->dcid];
|
||||
|
||||
@ -453,7 +453,7 @@ void WiimoteDevice::ReceiveConfigurationReq(u8 _Ident, u8* _pData, u32 _Size)
|
||||
{
|
||||
case L2CAP_OPT_MTU:
|
||||
{
|
||||
_dbg_assert_(IOS_WIIMOTE, pOptions->length == L2CAP_OPT_MTU_SIZE);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, pOptions->length == L2CAP_OPT_MTU_SIZE);
|
||||
l2cap_cfg_opt_val_t* pMTU = (l2cap_cfg_opt_val_t*)&_pData[Offset];
|
||||
rChannel.MTU = pMTU->mtu;
|
||||
DEBUG_LOG(IOS_WIIMOTE, " MTU: 0x%04x", pMTU->mtu);
|
||||
@ -462,7 +462,7 @@ void WiimoteDevice::ReceiveConfigurationReq(u8 _Ident, u8* _pData, u32 _Size)
|
||||
|
||||
case L2CAP_OPT_FLUSH_TIMO:
|
||||
{
|
||||
_dbg_assert_(IOS_WIIMOTE, pOptions->length == L2CAP_OPT_FLUSH_TIMO_SIZE);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, pOptions->length == L2CAP_OPT_FLUSH_TIMO_SIZE);
|
||||
l2cap_cfg_opt_val_t* pFlushTimeOut = (l2cap_cfg_opt_val_t*)&_pData[Offset];
|
||||
rChannel.FlushTimeOut = pFlushTimeOut->flush_timo;
|
||||
DEBUG_LOG(IOS_WIIMOTE, " FlushTimeOut: 0x%04x", pFlushTimeOut->flush_timo);
|
||||
@ -470,7 +470,7 @@ void WiimoteDevice::ReceiveConfigurationReq(u8 _Ident, u8* _pData, u32 _Size)
|
||||
break;
|
||||
|
||||
default:
|
||||
_dbg_assert_msg_(IOS_WIIMOTE, 0, "Unknown Option: 0x%02x", pOptions->type);
|
||||
DEBUG_ASSERT_MSG(IOS_WIIMOTE, 0, "Unknown Option: 0x%02x", pOptions->type);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -500,7 +500,7 @@ void WiimoteDevice::ReceiveConfigurationResponse(u8 _Ident, u8* _pData, u32 _Siz
|
||||
DEBUG_LOG(IOS_WIIMOTE, " Flags: 0x%04x", rsp->flags);
|
||||
DEBUG_LOG(IOS_WIIMOTE, " Result: 0x%04x", rsp->result);
|
||||
|
||||
_dbg_assert_(IOS_WIIMOTE, rsp->result == L2CAP_SUCCESS);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, rsp->result == L2CAP_SUCCESS);
|
||||
|
||||
// update state machine
|
||||
SChannel& rChannel = m_Channel[rsp->scid];
|
||||
@ -579,7 +579,7 @@ void WiimoteDevice::SendDisconnectRequest(u16 scid)
|
||||
|
||||
void WiimoteDevice::SendConfigurationRequest(u16 scid, u16 MTU, u16 FlushTimeOut)
|
||||
{
|
||||
_dbg_assert_(IOS_WIIMOTE, DoesChannelExist(scid));
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, DoesChannelExist(scid));
|
||||
SChannel& rChannel = m_Channel[scid];
|
||||
|
||||
u8 Buffer[1024];
|
||||
@ -653,12 +653,12 @@ void WiimoteDevice::SDPSendServiceSearchResponse(u16 cid, u16 TransactionID,
|
||||
// verify block... we handle search pattern for HID service only
|
||||
{
|
||||
CBigEndianBuffer buffer(pServiceSearchPattern);
|
||||
_dbg_assert_(IOS_WIIMOTE, buffer.Read8(0) == SDP_SEQ8); // data sequence
|
||||
_dbg_assert_(IOS_WIIMOTE, buffer.Read8(1) == 0x03); // sequence size
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, buffer.Read8(0) == SDP_SEQ8); // data sequence
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, buffer.Read8(1) == 0x03); // sequence size
|
||||
|
||||
// HIDClassID
|
||||
_dbg_assert_(IOS_WIIMOTE, buffer.Read8(2) == 0x19);
|
||||
_dbg_assert_(IOS_WIIMOTE, buffer.Read16(3) == 0x1124);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, buffer.Read8(2) == 0x19);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, buffer.Read16(3) == 0x1124);
|
||||
}
|
||||
|
||||
u8 DataFrame[1000];
|
||||
@ -722,7 +722,7 @@ static int ParseAttribList(u8* pAttribIDList, u16& _startID, u16& _endID)
|
||||
|
||||
if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG)
|
||||
{
|
||||
_dbg_assert_(IOS_WIIMOTE, sequence == SDP_SEQ8);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, sequence == SDP_SEQ8);
|
||||
(void)seqSize;
|
||||
}
|
||||
|
||||
@ -756,8 +756,6 @@ void WiimoteDevice::SDPSendServiceAttributeResponse(u16 cid, u16 TransactionID,
|
||||
PanicAlert("Unknown service handle %x", ServiceHandle);
|
||||
}
|
||||
|
||||
// _dbg_assert_(IOS_WIIMOTE, ServiceHandle == 0x10000);
|
||||
|
||||
u32 contState = ParseCont(pContinuationState);
|
||||
|
||||
u32 packetSize = 0;
|
||||
@ -800,7 +798,7 @@ void WiimoteDevice::HandleSDP(u16 cid, u8* _pData, u32 _Size)
|
||||
{
|
||||
WARN_LOG(IOS_WIIMOTE, "!!! SDP_ServiceSearchRequest !!!");
|
||||
|
||||
_dbg_assert_(IOS_WIIMOTE, _Size == 13);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, _Size == 13);
|
||||
|
||||
u16 TransactionID = buffer.Read16(1);
|
||||
u8* pServiceSearchPattern = buffer.GetPointer(5);
|
||||
@ -891,7 +889,7 @@ void WiimoteDevice::ReceiveL2capData(u16 scid, const void* _pData, u32 _Size)
|
||||
Offset += sizeof(l2cap_hdr_t);
|
||||
|
||||
// Check if we are already reporting on this channel
|
||||
_dbg_assert_(IOS_WIIMOTE, DoesChannelExist(scid));
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, DoesChannelExist(scid));
|
||||
SChannel& rChannel = m_Channel[scid];
|
||||
|
||||
// Add an additional 4 byte header to the Wiimote report
|
||||
|
@ -94,7 +94,7 @@ const u8* GetAttribPacket(u32 serviceHandle, u32 cont, u32& _size)
|
||||
|
||||
if (serviceHandle == 0x10001)
|
||||
{
|
||||
_dbg_assert_(IOS_WIIMOTE, cont == 0x00);
|
||||
DEBUG_ASSERT(IOS_WIIMOTE, cont == 0x00);
|
||||
_size = sizeof(packet4_0x10001);
|
||||
return packet4_0x10001;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace USB
|
||||
{
|
||||
std::unique_ptr<u8[]> TransferCommand::MakeBuffer(const size_t size) const
|
||||
{
|
||||
_assert_msg_(IOS_USB, data_address != 0, "Invalid data_address");
|
||||
ASSERT_MSG(IOS_USB, data_address != 0, "Invalid data_address");
|
||||
auto buffer = std::make_unique<u8[]>(size);
|
||||
Memory::CopyFromEmu(buffer.get(), data_address, size);
|
||||
return buffer;
|
||||
@ -28,7 +28,7 @@ std::unique_ptr<u8[]> TransferCommand::MakeBuffer(const size_t size) const
|
||||
|
||||
void TransferCommand::FillBuffer(const u8* src, const size_t size) const
|
||||
{
|
||||
_assert_msg_(IOS_USB, size == 0 || data_address != 0, "Invalid data_address");
|
||||
ASSERT_MSG(IOS_USB, size == 0 || data_address != 0, "Invalid data_address");
|
||||
Memory::CopyToEmu(data_address, src, size);
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ USBHost::USBHost(Kernel& ios, const std::string& device_name) : Device(ios, devi
|
||||
{
|
||||
#ifdef __LIBUSB__
|
||||
const int ret = libusb_init(&m_libusb_context);
|
||||
_dbg_assert_msg_(IOS_USB, ret == 0, "Failed to init libusb for USB passthrough.");
|
||||
DEBUG_ASSERT_MSG(IOS_USB, ret == 0, "Failed to init libusb for USB passthrough.");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -109,9 +109,9 @@ LibusbDevice::GetEndpoints(const u8 config, const u8 interface_number, const u8
|
||||
ERROR_LOG(IOS_USB, "Invalid config descriptor %u for %04x:%04x", config, m_vid, m_pid);
|
||||
return descriptors;
|
||||
}
|
||||
_assert_(interface_number < m_config_descriptors[config]->Get()->bNumInterfaces);
|
||||
ASSERT(interface_number < m_config_descriptors[config]->Get()->bNumInterfaces);
|
||||
const auto& interface = m_config_descriptors[config]->Get()->interface[interface_number];
|
||||
_assert_(alt_setting < interface.num_altsetting);
|
||||
ASSERT(alt_setting < interface.num_altsetting);
|
||||
const libusb_interface_descriptor& interface_descriptor = interface.altsetting[alt_setting];
|
||||
for (u8 i = 0; i < interface_descriptor.bNumEndpoints; ++i)
|
||||
{
|
||||
|
Reference in New Issue
Block a user