From 7f00e271e5d82528dfe9e92461156f2667fa1476 Mon Sep 17 00:00:00 2001 From: nakeee Date: Sun, 7 Dec 2008 22:42:49 +0000 Subject: [PATCH] some nowx fixes git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1431 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.h | 2 +- .../Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp | 2 +- Source/Core/Core/Src/LogManager.cpp | 13 ++++++++++--- Source/Core/Core/Src/PowerPC/SymbolDB.cpp | 8 ++++++-- Source/Core/DolphinWX/Src/BootManager.cpp | 2 +- Source/Core/DolphinWX/Src/MainNoGUI.cpp | 3 +++ 6 files changed, 22 insertions(+), 8 deletions(-) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.h index 47c62e75d3..c20cd312e6 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_es.h @@ -122,7 +122,7 @@ public: // Prepare the out buffer(s) with zeroes as a safety precaution // to avoid returning bad values - for(int i = 0; i < Buffer.NumberPayloadBuffer; i++) + for(u32 i = 0; i < Buffer.NumberPayloadBuffer; i++) { Memory::Memset(Buffer.PayloadBuffer[i].m_Address, 0, Buffer.PayloadBuffer[i].m_Size); diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp index befd5f3b46..d2c79d446a 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp @@ -82,7 +82,7 @@ bool CWII_IPC_HLE_Device_fs::IOCtlV(u32 _CommandAddress) // Prepare the out buffer(s) with zeroes as a safety precaution // to avoid returning bad values - for(int i = 0; i < CommandBuffer.NumberPayloadBuffer; i++) + for(u32 i = 0; i < CommandBuffer.NumberPayloadBuffer; i++) { Memory::Memset(CommandBuffer.PayloadBuffer[i].m_Address, 0, CommandBuffer.PayloadBuffer[i].m_Size); diff --git a/Source/Core/Core/Src/LogManager.cpp b/Source/Core/Core/Src/LogManager.cpp index 6b21c2f94b..605d5444a4 100644 --- a/Source/Core/Core/Src/LogManager.cpp +++ b/Source/Core/Core/Src/LogManager.cpp @@ -16,9 +16,10 @@ // http://code.google.com/p/dolphin-emu/ #include -#include // for the timestamps - #include "Common.h" +#if defined(HAVE_WX) && HAVE_WX +#include // for the timestamps +#endif #include "StringUtil.h" #include "LogManager.h" #include "PowerPC/PowerPC.h" @@ -229,8 +230,9 @@ void LogManager::Log(LogTypes::LOG_TYPE _type, const char *_fmt, ...) va_end(ap); static u32 count = 0; +#if defined(HAVE_WX) && HAVE_WX wxDateTime datetime = wxDateTime::UNow(); // get timestamp - +#endif char* Msg2 = (char*)alloca(strlen(_fmt)+512); // Here's the old symbol request @@ -267,7 +269,12 @@ void LogManager::Log(LogTypes::LOG_TYPE _type, const char *_fmt, ...) sprintf(Msg2, "%i %02i:%02i:%03i: %x %s (%s, %08x) : %s%s", //v, ++count, +#if defined(HAVE_WX) && HAVE_WX datetime.GetMinute(), datetime.GetSecond(), datetime.GetMillisecond(), +#else + 0, 0, 0, + // TODO get proper values +#endif PowerPC::ppcState.DebugCount, m_Log[_type]->m_szShortName_, // (CONSOLE etc) symbol.c_str(), PC, // current PC location (name, address) diff --git a/Source/Core/Core/Src/PowerPC/SymbolDB.cpp b/Source/Core/Core/Src/PowerPC/SymbolDB.cpp index b3541d2a62..967b26e6fe 100644 --- a/Source/Core/Core/Src/PowerPC/SymbolDB.cpp +++ b/Source/Core/Core/Src/PowerPC/SymbolDB.cpp @@ -26,8 +26,10 @@ #include "SignatureDB.h" #include "PPCAnalyst.h" +#if defined(HAVE_WX) && HAVE_WX #include #include +#endif SymbolDB g_symbolDB; @@ -368,10 +370,12 @@ bool SymbolDB::SaveMap(const char *filename, bool WithCodes) const } } // --------------- - +#if defined(HAVE_WX) && HAVE_WX // Show success message wxMessageBox(wxString::Format(wxT("Saved %s"), mapFile.c_str())); - +#else + // Show message somewhere +#endif // Close the file and return fclose(f); return true; diff --git a/Source/Core/DolphinWX/Src/BootManager.cpp b/Source/Core/DolphinWX/Src/BootManager.cpp index fdd84a6d16..971abf3d8e 100644 --- a/Source/Core/DolphinWX/Src/BootManager.cpp +++ b/Source/Core/DolphinWX/Src/BootManager.cpp @@ -26,9 +26,9 @@ #include "Volume.h" #include "VolumeCreator.h" #include "Config.h" -#include "ConfigMain.h" #include "Core.h" #if defined(HAVE_WX) && HAVE_WX +#include "ConfigMain.h" #include "Frame.h" #include "CodeWindow.h" #endif diff --git a/Source/Core/DolphinWX/Src/MainNoGUI.cpp b/Source/Core/DolphinWX/Src/MainNoGUI.cpp index bd0c6c9490..48d379ad57 100644 --- a/Source/Core/DolphinWX/Src/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/Src/MainNoGUI.cpp @@ -1,10 +1,13 @@ #include #include +#include + #ifndef _WIN32 //#include #else #endif + #include "Globals.h" #include "Host.h" #include "Common.h"