From b1cd01819b1d507398b8ca3f1fff78c7fc99af5d Mon Sep 17 00:00:00 2001 From: gigaherz Date: Mon, 1 Sep 2008 15:18:32 +0000 Subject: [PATCH] replace _DEBUG with LOGGING in the #ifs. Thanks to Xuefer for this change. also unbroke somethign which shouldn't have been there in the last commit. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@426 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp | 4 +- .../Core/Src/IPC_HLE/WII_IPC_HLE_Device.h | 8 +-- .../Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h | 2 +- .../Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h | 4 +- .../Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp | 49 ++++++++++--------- Source/Core/DolphinWX/src/MemcardManager.cpp | 1 - 6 files changed, 35 insertions(+), 33 deletions(-) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp index 3c2a239676..e0eaa45923 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp @@ -209,7 +209,7 @@ void ExecuteCommand(u32 _Address) // HLE - Create a new HLE device std::string DeviceName; Memory::GetString(DeviceName, Memory::Read_U32(_Address + 0xC)); -#ifdef _DEBUG +#ifdef LOGGING u32 Mode = Memory::Read_U32(_Address+0x10); #endif @@ -229,7 +229,7 @@ void ExecuteCommand(u32 _Address) } else { -#ifdef _DEBUG +#ifdef LOGGING IWII_IPC_HLE_Device* pDevice = AccessDeviceByID(DeviceID); #endif diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h index 2453279206..0bbc1665af 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h @@ -128,10 +128,10 @@ protected: for (u32 i=0; iOpcode); u16 ogf = HCI_OGF(pMsg->Opcode); #endif @@ -824,9 +825,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadLocalFeatures(u8* _Input) void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadStoredLinkKey(u8* _Input) { -#ifdef _DEBUG +#ifdef LOGGING // command parameters - hci_read_stored_link_key_cp* ReadStoredLinkKey = (hci_read_stored_link_key_cp*)_Input; + hci_read_stored_link_key_cp* ReadStoredLinkKey = (hci_read_stored_link_key_cp*)_Input; #endif // reply hci_read_stored_link_key_rp Reply; @@ -924,10 +925,11 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandHostBufferSize(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; +#ifdef LOGGING + // command parameters + hci_write_page_timeout_cp* pWritePageTimeOut = (hci_write_page_timeout_cp*)_Input; #endif + // reply hci_host_buffer_size_rp Reply; Reply.status = 0x00; @@ -951,7 +953,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)); -#ifdef _DEBUG +#ifdef LOGGING static char Scanning[][128] = { { "HCI_NO_SCAN_ENABLE"}, @@ -960,6 +962,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteScanEnable(u8* _Input) { "HCI_INQUIRY_AND_PAGE_SCAN_ENABLE"}, }; #endif + LOG(USB_HLE_LOG, "Command: HCI_CMD_WRITE_SCAN_ENABLE:"); LOG(USB_HLE_LOG, "write:"); LOG(USB_HLE_LOG, " scan_enable: %s", Scanning[pWriteScanEnable->scan_enable]); @@ -967,17 +970,18 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteScanEnable(u8* _Input) void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryMode(u8* _Input) { -#ifdef _DEBUG +#ifdef LOGGING // command parameters - hci_write_inquiry_mode_cp* pInquiryMode = (hci_write_inquiry_mode_cp*)_Input; + hci_write_inquiry_mode_cp* pInquiryMode = (hci_write_inquiry_mode_cp*)_Input; #endif + // reply hci_write_inquiry_mode_rp Reply; Reply.status = 0x00; SendEventCommandComplete(HCI_CMD_WRITE_INQUIRY_MODE, &Reply, sizeof(hci_write_inquiry_mode_rp)); -#ifdef _DEBUG +#ifdef LOGGING static char InquiryMode[][128] = { { "Standard Inquiry Result event format (default)" }, @@ -992,17 +996,18 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryMode(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; +#ifdef LOGGING + // command parameters + hci_write_page_scan_type_cp* pWritePageScanType = (hci_write_page_scan_type_cp*)_Input; #endif + // reply hci_write_page_scan_type_rp Reply; Reply.status = 0x00; SendEventCommandComplete(HCI_CMD_WRITE_PAGE_SCAN_TYPE, &Reply, sizeof(hci_write_page_scan_type_rp)); -#ifdef _DEBUG +#ifdef LOGGING static char PageScanType[][128] = { { "Mandatory: Standard Scan (default)" }, @@ -1041,10 +1046,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandInquiry(u8* _Input) u8 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"); m_State = STATE_INQUIRY_RESPONSE; SendEventCommandStatus(HCI_CMD_INQUIRY); @@ -1060,9 +1062,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandInquiry(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; +#ifdef LOGGING + // command parameters + hci_write_inquiry_scan_type_cp* pSetEventFilter = (hci_write_inquiry_scan_type_cp*)_Input; #endif // reply hci_write_inquiry_scan_type_rp Reply; @@ -1170,10 +1172,11 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandCreateCon(u8* _Input) void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandAcceptCon(u8* _Input) { -#ifdef _DEBUG +#ifdef LOGGING // 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, "Input:"); LOG(USB_HLE_LOG, " bd: %02x:%02x:%02x:%02x:%02x:%02x", diff --git a/Source/Core/DolphinWX/src/MemcardManager.cpp b/Source/Core/DolphinWX/src/MemcardManager.cpp index 975ebe2375..84cfa89c75 100644 --- a/Source/Core/DolphinWX/src/MemcardManager.cpp +++ b/Source/Core/DolphinWX/src/MemcardManager.cpp @@ -128,7 +128,6 @@ void CMemcardManager::CreateGUIControls() m_MemcardList[0]->AssignImageList(new wxImageList(96,32),wxIMAGE_LIST_SMALL); m_MemcardList[1]->AssignImageList(new wxImageList(96,32),wxIMAGE_LIST_SMALL); - m_MemcardList[0]-> // mmmm sizer goodness wxBoxSizer* sButtons;