summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/LogManager.cpp
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2010-01-19 19:28:27 +0000
committerhrydgard <hrydgard@gmail.com>2010-01-19 19:28:27 +0000
commit576990c5a318f5007131fff44b0ce68d4898d4a8 (patch)
treef1268ea52b4211fea522783ff522cbc58a691c22 /Source/Core/Common/Src/LogManager.cpp
parent657ba22f5407a0c641a3b5690a70cb750e2e1255 (diff)
JitIL is no longer a separate .exe/binary - it's now a simple option, Dolphin.exe now contains both cores.
Advantages: * Less confusion for users * No need to build twice to make sure you didn't break something * Easier to switch between the cores for testing Disadvantages: * None, as far as I can tell :) Maybe some extra code complexity, but not much. Also break some include chains that caused <windows.h> to get included into everything, slowing down the build on Windows. There's more to do here though, there's still a lot of files that get it included that don't need it at all. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4891 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/LogManager.cpp')
-rw-r--r--Source/Core/Common/Src/LogManager.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/Source/Core/Common/Src/LogManager.cpp b/Source/Core/Common/Src/LogManager.cpp
index 199a0cf4f0..7e9aae01ca 100644
--- a/Source/Core/Common/Src/LogManager.cpp
+++ b/Source/Core/Common/Src/LogManager.cpp
@@ -16,7 +16,10 @@
// http://code.google.com/p/dolphin-emu/
#include "LogManager.h"
+#include "ConsoleListener.h"
#include "Timer.h"
+#include "Thread.h"
+
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
const char *file, int line, const char* fmt, ...)
{
@@ -28,7 +31,9 @@ void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
LogManager *LogManager::m_logManager = NULL;
-LogManager::LogManager() : logMutex(1) {
+LogManager::LogManager() {
+ logMutex = new Common::CriticalSection(1);
+
// create log files
m_Log[LogTypes::MASTER_LOG] = new LogContainer("*", "Master Log");
m_Log[LogTypes::BOOT] = new LogContainer("BOOT", "Boot");
@@ -92,6 +97,7 @@ LogManager::~LogManager() {
}
delete m_fileLog;
delete m_consoleLog;
+ delete logMutex;
}
void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
@@ -113,15 +119,15 @@ void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
file, line, level_to_char[(int)level],
log->getShortName(), temp);
- logMutex.Enter();
+ logMutex->Enter();
log->trigger(level, msg);
- logMutex.Leave();
+ logMutex->Leave();
}
void LogManager::removeListener(LogTypes::LOG_TYPE type, LogListener *listener) {
- logMutex.Enter();
+ logMutex->Enter();
m_Log[type]->removeListener(listener);
- logMutex.Leave();
+ logMutex->Leave();
}
LogContainer::LogContainer(const char* shortName, const char* fullName, bool enable)