From b7f1e937bbbb5b50f65cb8d5180ac1d7cbc5d941 Mon Sep 17 00:00:00 2001 From: John Peterson Date: Sun, 4 Jan 2009 16:52:28 +0000 Subject: [PATCH] LogManager: Opt out of even if you have wx git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1765 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/Common.h | 33 ++++++++++++++++------------- Source/Core/Core/Src/LogManager.cpp | 8 +++---- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index 3c9ed887b3..a0fbeae3ea 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -24,24 +24,27 @@ #define CHECK_HEAP_INTEGRITY() #ifdef _WIN32 -#ifdef _DEBUG -#include -#undef CHECK_HEAP_INTEGRITY -#define CHECK_HEAP_INTEGRITY() {if (!_CrtCheckMemory()) PanicAlert("memory corruption detected. see log.");} -#endif + #ifdef _DEBUG + #include + #undef CHECK_HEAP_INTEGRITY + #define CHECK_HEAP_INTEGRITY() {if (!_CrtCheckMemory()) PanicAlert("memory corruption detected. see log.");} + #endif -/* Turn on logging with debugging, _DEBUG and DEBUGFAST are still added through - preprocessor definitions only */ -#if defined(_DEBUG) || defined(DEBUGFAST) - #define LOGGING -#endif + /* Turn on logging with debugging, _DEBUG and DEBUGFAST are still added through + preprocessor definitions only */ + #if defined(_DEBUG) || defined(DEBUGFAST) + #define LOGGING + #endif -#include "../../../PluginSpecs/CommonTypes.h" -#define HAVE_WIIUSE 1 -#define HAVE_WX 1 + // Allow wxWidgets in Core + //#define WX_CORE + + #include "../../../PluginSpecs/CommonTypes.h" + #define HAVE_WIIUSE 1 + #define HAVE_WX 1 #else -#include "CommonTypes.h" -#include "Config.h" + #include "CommonTypes.h" + #include "Config.h" #endif #include diff --git a/Source/Core/Core/Src/LogManager.cpp b/Source/Core/Core/Src/LogManager.cpp index 8f6ab72a94..aa5ba6eb9d 100644 --- a/Source/Core/Core/Src/LogManager.cpp +++ b/Source/Core/Core/Src/LogManager.cpp @@ -30,7 +30,7 @@ #include "PowerPC/SymbolDB.h" // for g_symbolDB #include "Debugger/Debugger_SymbolMap.h" -#if defined(HAVE_WX) && HAVE_WX // wxWidgets +#if defined(HAVE_WX) && HAVE_WX && defined(WX_CORE) // wxWidgets #include // for the timestamps #endif ///////////////////////// @@ -238,7 +238,7 @@ void LogManager::Log(LogTypes::LOG_TYPE _type, const char *_fmt, ...) static u32 count = 0; char* Msg2 = (char*)alloca(strlen(_fmt)+512); - #if defined(HAVE_WX) && HAVE_WX + #if defined(HAVE_WX) && HAVE_WX && defined(WX_CORE) wxDateTime datetime = wxDateTime::UNow(); // get timestamp #endif @@ -272,13 +272,13 @@ void LogManager::Log(LogTypes::LOG_TYPE _type, const char *_fmt, ...) const char *eol = "\n"; if (Index > 0) { - #if defined(HAVE_WX) && HAVE_WX + #if defined(HAVE_WX) && HAVE_WX && defined(WX_CORE) sprintf(Msg2, "%i %02i:%02i:%03i: %x %s (%s, %08x) : %s%s", #else sprintf(Msg2, "%i %llu: %x %s (%s, %08x) : %s%s", #endif ++count, - #if defined(HAVE_WX) && HAVE_WX + #if defined(HAVE_WX) && HAVE_WX && defined(WX_CORE) datetime.GetMinute(), datetime.GetSecond(), datetime.GetMillisecond(), #else Common::Timer::GetTimeSinceJan1970(),