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
This commit is contained in:
parent
fa00041f77
commit
27dce100f3
|
@ -17,19 +17,15 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
|
||||||
#include <wx/datetime.h> // for the timestamps
|
|
||||||
#endif
|
|
||||||
#include "StringUtil.h"
|
#include "StringUtil.h"
|
||||||
#include "LogManager.h"
|
#include "LogManager.h"
|
||||||
#include "PowerPC/PowerPC.h"
|
#include "PowerPC/PowerPC.h"
|
||||||
#include "PowerPC/SymbolDB.h" // for g_symbolDB
|
#include "PowerPC/SymbolDB.h" // for g_symbolDB
|
||||||
#include "Debugger/Debugger_SymbolMap.h"
|
#include "Debugger/Debugger_SymbolMap.h"
|
||||||
|
#include "Timer.h"
|
||||||
|
|
||||||
LogManager::SMessage (*LogManager::m_Messages)[MAX_MESSAGES];
|
LogManager::SMessage (*LogManager::m_Messages)[MAX_MESSAGES];
|
||||||
int LogManager::m_nextMessages[LogManager::VERBOSITY_LEVELS + 1];
|
int LogManager::m_nextMessages[LogManager::VERBOSITY_LEVELS + 1];
|
||||||
|
|
||||||
CDebugger_Log* LogManager::m_Log[LogTypes::NUMBER_OF_LOGS + (LogManager::VERBOSITY_LEVELS * 100)];
|
CDebugger_Log* LogManager::m_Log[LogTypes::NUMBER_OF_LOGS + (LogManager::VERBOSITY_LEVELS * 100)];
|
||||||
int LogManager::m_activeLog = LogTypes::MASTER_LOG;
|
int LogManager::m_activeLog = LogTypes::MASTER_LOG;
|
||||||
bool LogManager::m_bDirty = true;
|
bool LogManager::m_bDirty = true;
|
||||||
|
@ -224,9 +220,6 @@ void LogManager::Log(LogTypes::LOG_TYPE _type, const char *_fmt, ...)
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
static u32 count = 0;
|
static u32 count = 0;
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
|
||||||
wxDateTime datetime = wxDateTime::UNow(); // get timestamp
|
|
||||||
#endif
|
|
||||||
char* Msg2 = (char*)alloca(strlen(_fmt)+512);
|
char* Msg2 = (char*)alloca(strlen(_fmt)+512);
|
||||||
|
|
||||||
// Here's the old symbol request
|
// Here's the old symbol request
|
||||||
|
@ -260,15 +253,10 @@ void LogManager::Log(LogTypes::LOG_TYPE _type, const char *_fmt, ...)
|
||||||
if (Index > 0)
|
if (Index > 0)
|
||||||
{
|
{
|
||||||
//sprintf(Msg2, "%i | %i %02i:%02i:%03i: %x %s (%s, %08x) : %s%s",
|
//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",
|
sprintf(Msg2, "%i %llu: %x %s (%s, %08x) : %s%s",
|
||||||
//v,
|
//v,
|
||||||
++count,
|
++count,
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
Common::Timer::GetTimeSinceJan1970(),
|
||||||
datetime.GetMinute(), datetime.GetSecond(), datetime.GetMillisecond(),
|
|
||||||
#else
|
|
||||||
0, 0, 0,
|
|
||||||
// TODO get proper values
|
|
||||||
#endif
|
|
||||||
PowerPC::ppcState.DebugCount,
|
PowerPC::ppcState.DebugCount,
|
||||||
m_Log[_type]->m_szShortName_, // (CONSOLE etc)
|
m_Log[_type]->m_szShortName_, // (CONSOLE etc)
|
||||||
symbol.c_str(), PC, // current PC location (name, address)
|
symbol.c_str(), PC, // current PC location (name, address)
|
||||||
|
|
|
@ -26,11 +26,6 @@
|
||||||
#include "SignatureDB.h"
|
#include "SignatureDB.h"
|
||||||
#include "PPCAnalyst.h"
|
#include "PPCAnalyst.h"
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
|
||||||
#include <wx/textdlg.h>
|
|
||||||
#include <wx/msgdlg.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SymbolDB g_symbolDB;
|
SymbolDB g_symbolDB;
|
||||||
|
|
||||||
SymbolDB::SymbolDB()
|
SymbolDB::SymbolDB()
|
||||||
|
@ -371,13 +366,7 @@ bool SymbolDB::SaveMap(const char *filename, bool WithCodes) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ---------------
|
// ---------------
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
SuccessAlert("Saved %s", mapFile.c_str());
|
||||||
// Show success message
|
|
||||||
wxMessageBox(wxString::Format(wxT("Saved %s"), mapFile.c_str()));
|
|
||||||
#else
|
|
||||||
// Show message somewhere
|
|
||||||
#endif
|
|
||||||
// Close the file and return
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue