From 27dce100f3625c0cecb2385298b57d02ca504c45 Mon Sep 17 00:00:00 2001 From: nakeee Date: Thu, 18 Dec 2008 23:02:19 +0000 Subject: [PATCH] removed wxcode from core. Note that while that now logs will not have the date in natural format. it will have the standard sec since epoch notation. Which is faster to log, and not wx depended. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1589 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/LogManager.cpp | 30 +++++++---------------- Source/Core/Core/Src/PowerPC/SymbolDB.cpp | 17 +++---------- 2 files changed, 12 insertions(+), 35 deletions(-) diff --git a/Source/Core/Core/Src/LogManager.cpp b/Source/Core/Core/Src/LogManager.cpp index 57bfb14992..b0983f1a97 100644 --- a/Source/Core/Core/Src/LogManager.cpp +++ b/Source/Core/Core/Src/LogManager.cpp @@ -17,23 +17,19 @@ #include #include "Common.h" -#if defined(HAVE_WX) && HAVE_WX -#include // for the timestamps -#endif #include "StringUtil.h" #include "LogManager.h" #include "PowerPC/PowerPC.h" #include "PowerPC/SymbolDB.h" // for g_symbolDB #include "Debugger/Debugger_SymbolMap.h" - +#include "Timer.h" LogManager::SMessage (*LogManager::m_Messages)[MAX_MESSAGES]; -int LogManager::m_nextMessages[LogManager::VERBOSITY_LEVELS + 1]; - -CDebugger_Log* LogManager::m_Log[LogTypes::NUMBER_OF_LOGS + (LogManager::VERBOSITY_LEVELS * 100)]; -int LogManager::m_activeLog = LogTypes::MASTER_LOG; -bool LogManager::m_bDirty = true; -bool LogManager::m_bInitialized = false; +int LogManager::m_nextMessages[LogManager::VERBOSITY_LEVELS + 1]; +CDebugger_Log* LogManager::m_Log[LogTypes::NUMBER_OF_LOGS + (LogManager::VERBOSITY_LEVELS * 100)]; +int LogManager::m_activeLog = LogTypes::MASTER_LOG; +bool LogManager::m_bDirty = true; +bool LogManager::m_bInitialized = false; void __Log(int log, const char *format, ...) @@ -224,9 +220,6 @@ 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 @@ -260,15 +253,10 @@ void LogManager::Log(LogTypes::LOG_TYPE _type, const char *_fmt, ...) if (Index > 0) { //sprintf(Msg2, "%i | %i %02i:%02i:%03i: %x %s (%s, %08x) : %s%s", - sprintf(Msg2, "%i %02i:%02i:%03i: %x %s (%s, %08x) : %s%s", - //v, + sprintf(Msg2, "%i %llu: %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 + Common::Timer::GetTimeSinceJan1970(), 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 fc81deedcd..1339d18107 100644 --- a/Source/Core/Core/Src/PowerPC/SymbolDB.cpp +++ b/Source/Core/Core/Src/PowerPC/SymbolDB.cpp @@ -26,11 +26,6 @@ #include "SignatureDB.h" #include "PPCAnalyst.h" -#if defined(HAVE_WX) && HAVE_WX -#include -#include -#endif - SymbolDB g_symbolDB; SymbolDB::SymbolDB() @@ -371,14 +366,8 @@ 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; + SuccessAlert("Saved %s", mapFile.c_str()); + fclose(f); + return true; } // ===========