Reverted the "warning removal" changes because they broke debug building in windows. Used #ifdef _DEBUG to disable those lines in release builds instead.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@424 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
gigaherz 2008-09-01 14:49:34 +00:00
parent 10eef7f60e
commit b0f51a0b98
5 changed files with 69 additions and 27 deletions

View File

@ -209,7 +209,9 @@ void ExecuteCommand(u32 _Address)
// HLE - Create a new HLE device // HLE - Create a new HLE device
std::string DeviceName; std::string DeviceName;
Memory::GetString(DeviceName, Memory::Read_U32(_Address + 0xC)); Memory::GetString(DeviceName, Memory::Read_U32(_Address + 0xC));
// u32 Mode = Memory::Read_U32(_Address+0x10); #ifdef _DEBUG
u32 Mode = Memory::Read_U32(_Address+0x10);
#endif
u32 DeviceID = GetDeviceIDByName(DeviceName); u32 DeviceID = GetDeviceIDByName(DeviceName);
if (DeviceID == 0) if (DeviceID == 0)
@ -227,7 +229,9 @@ void ExecuteCommand(u32 _Address)
} }
else else
{ {
// IWII_IPC_HLE_Device* pDevice = AccessDeviceByID(DeviceID); #ifdef _DEBUG
IWII_IPC_HLE_Device* pDevice = AccessDeviceByID(DeviceID);
#endif
// we have already opened this device // we have already opened this device
Memory::Write_U32(-6, _Address + 4); Memory::Write_U32(-6, _Address + 4);

View File

@ -128,9 +128,11 @@ protected:
for (u32 i=0; i<NumberOutBuffer; i++) for (u32 i=0; i<NumberOutBuffer; i++)
{ {
// u32 OutBuffer = Memory::Read_U32(BufferOffset); BufferOffset += 4; #ifdef _DEBUG
// u32 OutBufferSize = Memory::Read_U32(BufferOffset); BufferOffset += 4; u32 OutBuffer = Memory::Read_U32(BufferOffset); BufferOffset += 4;
u32 OutBufferSize = Memory::Read_U32(BufferOffset); BufferOffset += 4;
#endif
Memory::Write_U32(1, _CommandAddress + 0x4); Memory::Write_U32(1, _CommandAddress + 0x4);

View File

@ -57,11 +57,13 @@ public:
virtual bool IOCtl(u32 _CommandAddress) virtual bool IOCtl(u32 _CommandAddress)
{ {
// u32 Parameter = Memory::Read_U32(_CommandAddress +0x0C); #ifdef _DEBUG
// u32 Buffer1 = Memory::Read_U32(_CommandAddress +0x10); u32 Parameter = Memory::Read_U32(_CommandAddress +0x0C);
// u32 BufferSize1 = Memory::Read_U32(_CommandAddress +0x14); u32 Buffer1 = Memory::Read_U32(_CommandAddress +0x10);
// u32 Buffer2 = Memory::Read_U32(_CommandAddress +0x18); u32 BufferSize1 = Memory::Read_U32(_CommandAddress +0x14);
// u32 BufferSize2 = Memory::Read_U32(_CommandAddress +0x1C); u32 Buffer2 = Memory::Read_U32(_CommandAddress +0x18);
u32 BufferSize2 = Memory::Read_U32(_CommandAddress +0x1C);
#endif
// write return value // write return value
Memory::Write_U32(0, _CommandAddress + 0x4); Memory::Write_U32(0, _CommandAddress + 0x4);

View File

@ -57,10 +57,12 @@ public:
virtual bool IOCtl(u32 _CommandAddress) virtual bool IOCtl(u32 _CommandAddress)
{ {
u32 Parameter = Memory::Read_U32(_CommandAddress +0x0C); u32 Parameter = Memory::Read_U32(_CommandAddress +0x0C);
// u32 Buffer1 = Memory::Read_U32(_CommandAddress +0x10); #ifdef _DEBUG
// u32 BufferSize1 = Memory::Read_U32(_CommandAddress +0x14); u32 Buffer1 = Memory::Read_U32(_CommandAddress +0x10);
// u32 Buffer2 = Memory::Read_U32(_CommandAddress +0x18); u32 BufferSize1 = Memory::Read_U32(_CommandAddress +0x14);
// u32 BufferSize2 = Memory::Read_U32(_CommandAddress +0x1C); u32 Buffer2 = Memory::Read_U32(_CommandAddress +0x18);
u32 BufferSize2 = Memory::Read_U32(_CommandAddress +0x1C);
#endif
// write return value // write return value
Memory::Write_U32(1, _CommandAddress + 0x4); Memory::Write_U32(1, _CommandAddress + 0x4);
@ -121,8 +123,10 @@ public:
u32 Parameter = Memory::Read_U32(_CommandAddress +0x0C); u32 Parameter = Memory::Read_U32(_CommandAddress +0x0C);
u32 Buffer1 = Memory::Read_U32(_CommandAddress +0x10); u32 Buffer1 = Memory::Read_U32(_CommandAddress +0x10);
u32 BufferSize1 = Memory::Read_U32(_CommandAddress +0x14); u32 BufferSize1 = Memory::Read_U32(_CommandAddress +0x14);
// u32 Buffer2 = Memory::Read_U32(_CommandAddress +0x18); #ifdef _DEBUG
// u32 BufferSize2 = Memory::Read_U32(_CommandAddress +0x1C); u32 Buffer2 = Memory::Read_U32(_CommandAddress +0x18);
u32 BufferSize2 = Memory::Read_U32(_CommandAddress +0x1C);
#endif
// write return value // write return value
switch (Parameter) switch (Parameter)

View File

@ -76,8 +76,9 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtlV(u32 _CommandAddress)
CtrlSetup.wValue = *(u16*)Memory::GetPointer(CommandBuffer.InBuffer[2].m_Address); CtrlSetup.wValue = *(u16*)Memory::GetPointer(CommandBuffer.InBuffer[2].m_Address);
CtrlSetup.wIndex = *(u16*)Memory::GetPointer(CommandBuffer.InBuffer[3].m_Address); CtrlSetup.wIndex = *(u16*)Memory::GetPointer(CommandBuffer.InBuffer[3].m_Address);
CtrlSetup.wLength = *(u16*)Memory::GetPointer(CommandBuffer.InBuffer[4].m_Address); CtrlSetup.wLength = *(u16*)Memory::GetPointer(CommandBuffer.InBuffer[4].m_Address);
// u8 Termination =*(u8*)Memory::GetPointer(CommandBuffer.InBuffer[5].m_Address); #ifdef _DEBUG
u8 Termination =*(u8*)Memory::GetPointer(CommandBuffer.InBuffer[5].m_Address);
#endif
CtrlSetup.m_PayLoadAddr = CommandBuffer.PayloadBuffer[0].m_Address; CtrlSetup.m_PayLoadAddr = CommandBuffer.PayloadBuffer[0].m_Address;
CtrlSetup.m_PayLoadSize = CommandBuffer.PayloadBuffer[0].m_Size; CtrlSetup.m_PayLoadSize = CommandBuffer.PayloadBuffer[0].m_Size;
@ -714,8 +715,10 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::ExecuteHCICommandMessage(const SHCICom
// //
default: default:
{ {
// u16 ocf = HCI_OCF(pMsg->Opcode); #ifdef _DEBUG
// u16 ogf = HCI_OGF(pMsg->Opcode); u16 ocf = HCI_OCF(pMsg->Opcode);
u16 ogf = HCI_OGF(pMsg->Opcode);
#endif
_dbg_assert_msg_(USB_HLE_LOG, 0, "Unknown USB_IOCTL_CTRLMSG: 0x%04X (ocf: 0x%x ogf 0x%x)", pMsg->Opcode, ocf, ogf); _dbg_assert_msg_(USB_HLE_LOG, 0, "Unknown USB_IOCTL_CTRLMSG: 0x%04X (ocf: 0x%x ogf 0x%x)", pMsg->Opcode, ocf, ogf);
@ -821,6 +824,10 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadLocalFeatures(u8* _Input)
void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadStoredLinkKey(u8* _Input) void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadStoredLinkKey(u8* _Input)
{ {
#ifdef _DEBUG
// command parameters
hci_read_stored_link_key_cp* ReadStoredLinkKey = (hci_read_stored_link_key_cp*)_Input;
#endif
// reply // reply
hci_read_stored_link_key_rp Reply; hci_read_stored_link_key_rp Reply;
Reply.status = 0x00; Reply.status = 0x00;
@ -917,6 +924,10 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandHostBufferSize(u8* _Input)
void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWritePageTimeOut(u8* _Input) void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWritePageTimeOut(u8* _Input)
{ {
#ifdef _DEBUG
// command parameters
hci_write_page_timeout_cp* pWritePageTimeOut = (hci_write_page_timeout_cp*)_Input;
#endif
// reply // reply
hci_host_buffer_size_rp Reply; hci_host_buffer_size_rp Reply;
Reply.status = 0x00; Reply.status = 0x00;
@ -940,7 +951,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteScanEnable(u8* _Input)
SendEventCommandComplete(HCI_CMD_WRITE_SCAN_ENABLE, &Reply, sizeof(hci_write_scan_enable_rp)); SendEventCommandComplete(HCI_CMD_WRITE_SCAN_ENABLE, &Reply, sizeof(hci_write_scan_enable_rp));
/* #ifdef _DEBUG
static char Scanning[][128] = static char Scanning[][128] =
{ {
{ "HCI_NO_SCAN_ENABLE"}, { "HCI_NO_SCAN_ENABLE"},
@ -948,7 +959,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteScanEnable(u8* _Input)
{ "HCI_PAGE_SCAN_ENABLE"}, { "HCI_PAGE_SCAN_ENABLE"},
{ "HCI_INQUIRY_AND_PAGE_SCAN_ENABLE"}, { "HCI_INQUIRY_AND_PAGE_SCAN_ENABLE"},
}; };
*/ #endif
LOG(USB_HLE_LOG, "Command: HCI_CMD_WRITE_SCAN_ENABLE:"); LOG(USB_HLE_LOG, "Command: HCI_CMD_WRITE_SCAN_ENABLE:");
LOG(USB_HLE_LOG, "write:"); LOG(USB_HLE_LOG, "write:");
LOG(USB_HLE_LOG, " scan_enable: %s", Scanning[pWriteScanEnable->scan_enable]); LOG(USB_HLE_LOG, " scan_enable: %s", Scanning[pWriteScanEnable->scan_enable]);
@ -956,20 +967,24 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteScanEnable(u8* _Input)
void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryMode(u8* _Input) void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryMode(u8* _Input)
{ {
#ifdef _DEBUG
// command parameters
hci_write_inquiry_mode_cp* pInquiryMode = (hci_write_inquiry_mode_cp*)_Input;
#endif
// reply // reply
hci_write_inquiry_mode_rp Reply; hci_write_inquiry_mode_rp Reply;
Reply.status = 0x00; Reply.status = 0x00;
SendEventCommandComplete(HCI_CMD_WRITE_INQUIRY_MODE, &Reply, sizeof(hci_write_inquiry_mode_rp)); SendEventCommandComplete(HCI_CMD_WRITE_INQUIRY_MODE, &Reply, sizeof(hci_write_inquiry_mode_rp));
/* #ifdef _DEBUG
static char InquiryMode[][128] = static char InquiryMode[][128] =
{ {
{ "Standard Inquiry Result event format (default)" }, { "Standard Inquiry Result event format (default)" },
{ "Inquiry Result format with RSSI" }, { "Inquiry Result format with RSSI" },
{ "Inquiry Result with RSSI format or Extended Inquiry Result format" } { "Inquiry Result with RSSI format or Extended Inquiry Result format" }
}; };
*/ #endif
LOG(USB_HLE_LOG, "Command: HCI_CMD_WRITE_INQUIRY_MODE:"); LOG(USB_HLE_LOG, "Command: HCI_CMD_WRITE_INQUIRY_MODE:");
LOG(USB_HLE_LOG, "write:"); LOG(USB_HLE_LOG, "write:");
LOG(USB_HLE_LOG, " mode: %s", InquiryMode[pInquiryMode->mode]); LOG(USB_HLE_LOG, " mode: %s", InquiryMode[pInquiryMode->mode]);
@ -977,19 +992,23 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryMode(u8* _Input)
void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWritePageScanType(u8* _Input) void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWritePageScanType(u8* _Input)
{ {
#ifdef _DEBUG
// command parameters
hci_write_page_scan_type_cp* pWritePageScanType = (hci_write_page_scan_type_cp*)_Input;
#endif
// reply // reply
hci_write_page_scan_type_rp Reply; hci_write_page_scan_type_rp Reply;
Reply.status = 0x00; Reply.status = 0x00;
SendEventCommandComplete(HCI_CMD_WRITE_PAGE_SCAN_TYPE, &Reply, sizeof(hci_write_page_scan_type_rp)); SendEventCommandComplete(HCI_CMD_WRITE_PAGE_SCAN_TYPE, &Reply, sizeof(hci_write_page_scan_type_rp));
/* #ifdef _DEBUG
static char PageScanType[][128] = static char PageScanType[][128] =
{ {
{ "Mandatory: Standard Scan (default)" }, { "Mandatory: Standard Scan (default)" },
{ "Optional: Interlaced Scan" } { "Optional: Interlaced Scan" }
}; };
*/ #endif
LOG(USB_HLE_LOG, "Command: HCI_CMD_WRITE_PAGE_SCAN_TYPE:"); LOG(USB_HLE_LOG, "Command: HCI_CMD_WRITE_PAGE_SCAN_TYPE:");
LOG(USB_HLE_LOG, "write:"); LOG(USB_HLE_LOG, "write:");
@ -1022,7 +1041,10 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandInquiry(u8* _Input)
u8 lap[HCI_LAP_SIZE]; u8 lap[HCI_LAP_SIZE];
memcpy(lap, pInquiry->lap, HCI_LAP_SIZE); memcpy(lap, pInquiry->lap, HCI_LAP_SIZE);
#ifdef _DEBUG
u8 inquiry_length = pInquiry->inquiry_length;
u8 num_responses = pInquiry->num_responses;
#endif
_dbg_assert_msg_(USB_HLE_LOG, m_State == STATE_NONE, "m_State != NONE"); _dbg_assert_msg_(USB_HLE_LOG, m_State == STATE_NONE, "m_State != NONE");
m_State = STATE_INQUIRY_RESPONSE; m_State = STATE_INQUIRY_RESPONSE;
SendEventCommandStatus(HCI_CMD_INQUIRY); SendEventCommandStatus(HCI_CMD_INQUIRY);
@ -1038,6 +1060,10 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandInquiry(u8* _Input)
void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryScanType(u8* _Input) void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryScanType(u8* _Input)
{ {
#ifdef _DEBUG
// command parameters
hci_write_inquiry_scan_type_cp* pSetEventFilter = (hci_write_inquiry_scan_type_cp*)_Input;
#endif
// reply // reply
hci_write_inquiry_scan_type_rp Reply; hci_write_inquiry_scan_type_rp Reply;
Reply.status = 0x00; Reply.status = 0x00;
@ -1144,6 +1170,10 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandCreateCon(u8* _Input)
void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandAcceptCon(u8* _Input) void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandAcceptCon(u8* _Input)
{ {
#ifdef _DEBUG
// command parameters
hci_accept_con_cp* pAcceptCon = (hci_accept_con_cp*)_Input;
#endif
LOG(USB_HLE_LOG, "Command: HCI_CMD_ACCEPT_CON"); LOG(USB_HLE_LOG, "Command: HCI_CMD_ACCEPT_CON");
LOG(USB_HLE_LOG, "Input:"); LOG(USB_HLE_LOG, "Input:");
LOG(USB_HLE_LOG, " bd: %02x:%02x:%02x:%02x:%02x:%02x", LOG(USB_HLE_LOG, " bd: %02x:%02x:%02x:%02x:%02x:%02x",