Rearrange LogManager includes. The main purpose is to make it possible to modify Thread.h without recompiling the whole entire project.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3770 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
839ed9103d
commit
d85f5a6937
|
@ -19,6 +19,7 @@
|
|||
#define _MIXER_H_
|
||||
|
||||
#include "FixedSizeQueue.h"
|
||||
#include "Thread.h"
|
||||
|
||||
// On real hardware, this fifo is much, much smaller. But timing is also
|
||||
// tighter than under Windows, so...
|
||||
|
|
|
@ -85,16 +85,16 @@
|
|||
#define HAVE_SFML 1
|
||||
#define HAVE_OPENAL 1
|
||||
|
||||
namespace
|
||||
{
|
||||
// it is VERY DANGEROUS to mix _SECURE_SCL=0 and _SECURE_SCL=1 compiled libraries.
|
||||
// You will get bizarre crash bugs whenever you use STL.
|
||||
#ifndef _SECURE_SCL
|
||||
#error Please define _SECURE_SCL=0 in the project settings
|
||||
#else
|
||||
CompileTimeAssert<_SECURE_SCL==0> x;
|
||||
#endif
|
||||
}
|
||||
namespace
|
||||
{
|
||||
#ifndef _SECURE_SCL
|
||||
#error Please define _SECURE_SCL=0 in the project settings
|
||||
#else
|
||||
CompileTimeAssert<_SECURE_SCL==0> x;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Debug definions
|
||||
#if defined(_DEBUG)
|
||||
|
@ -111,7 +111,7 @@ namespace
|
|||
#define MAX_PATH 260
|
||||
|
||||
// Windows compatibility
|
||||
#define __forceinline inline
|
||||
#define __forceinline inline __attribute__((always_inline))
|
||||
|
||||
#ifdef _LP64
|
||||
#define _M_X64 1
|
||||
|
@ -119,11 +119,12 @@ namespace
|
|||
#define _M_IX86 1
|
||||
#endif
|
||||
// Alignment
|
||||
#define GC_ALIGNED16(x) __attribute((aligned(16))) x
|
||||
#define GC_ALIGNED32(x) __attribute((aligned(16))) x
|
||||
#define GC_ALIGNED64(x) __attribute((aligned(64))) x
|
||||
#define GC_ALIGNED16_DECL(x) __attribute((aligned(16))) x
|
||||
#define GC_ALIGNED64_DECL(x) __attribute((aligned(64))) x
|
||||
#define GC_ALIGNED16(x) __attribute__((aligned(16))) x
|
||||
#define GC_ALIGNED32(x) __attribute__((aligned(16))) x
|
||||
#define GC_ALIGNED64(x) __attribute__((aligned(64))) x
|
||||
#define GC_ALIGNED16_DECL(x) __attribute__((aligned(16))) x
|
||||
#define GC_ALIGNED64_DECL(x) __attribute__((aligned(64))) x
|
||||
|
||||
#endif // WIN32
|
||||
|
||||
// A macro to disallow the copy constructor and operator= functions
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include "Common.h"
|
||||
#include "FileUtil.h"
|
||||
#include "StringUtil.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
|
|
@ -102,15 +102,14 @@ enum LOG_LEVELS {
|
|||
#define INFO_LOG(...) {}
|
||||
#define DEBUG_LOG(...) {}
|
||||
|
||||
// FIXME can we get rid of this?
|
||||
#include "LogManager.h"
|
||||
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char *fmt, ...);
|
||||
|
||||
#ifdef GEKKO
|
||||
#define GENERIC_LOG(t, v, ...)
|
||||
#else
|
||||
|
||||
// Let the compiler optimize this out
|
||||
#define GENERIC_LOG(t, v, ...) {if (v <= MAX_LOGLEVEL) {LogManager::GetInstance()->Log(v, t, __VA_ARGS__);}}
|
||||
#define GENERIC_LOG(t, v, ...) {if (v <= MAX_LOGLEVEL) {GenericLog(v, t, __VA_ARGS__);}}
|
||||
#endif
|
||||
|
||||
#if MAX_LOGLEVEL >= ERROR_LEVEL
|
||||
|
|
|
@ -18,6 +18,14 @@
|
|||
#include "LogManager.h"
|
||||
#include "Timer.h"
|
||||
|
||||
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char* fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
LogManager::GetInstance()->Log(level, type, fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
LogManager *LogManager::m_logManager = NULL;
|
||||
|
||||
LogManager::LogManager()\
|
||||
|
@ -85,8 +93,7 @@ LogManager::~LogManager() {
|
|||
}
|
||||
|
||||
void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||
const char *format, ...) {
|
||||
va_list args;
|
||||
const char *format, va_list args) {
|
||||
|
||||
char temp[MAX_MSGLEN];
|
||||
char msg[MAX_MSGLEN + 512];
|
||||
|
@ -94,10 +101,8 @@ void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
|||
|
||||
if (! log->isEnable() || level > log->getLevel())
|
||||
return;
|
||||
|
||||
va_start(args, format);
|
||||
|
||||
CharArrayFromFormatV(temp, MAX_MSGLEN, format, args);
|
||||
va_end(args);
|
||||
|
||||
static const char level_to_char[7] = "-NEWID";
|
||||
sprintf(msg, "%s %c[%s]: %s\n",
|
||||
|
|
|
@ -137,7 +137,7 @@ public:
|
|||
static u32 GetMaxLevel() { return MAX_LOGLEVEL; }
|
||||
|
||||
void Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||
const char *fmt, ...);
|
||||
const char *fmt, va_list args);
|
||||
|
||||
void setLogLevel(LogTypes::LOG_TYPE type, LogTypes::LOG_LEVELS level) {
|
||||
m_Log[type]->setLevel(level);
|
||||
|
|
|
@ -18,10 +18,11 @@
|
|||
#ifndef _MATH_UTIL_H_
|
||||
#define _MATH_UTIL_H_
|
||||
|
||||
#include <xmmintrin.h>
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
#include <xmmintrin.h>
|
||||
#include <vector>
|
||||
|
||||
namespace MathUtil
|
||||
{
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
|
|
|
@ -15,11 +15,6 @@
|
|||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/timeb.h>
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "Common.h"
|
||||
#include <string>
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#include <mmsystem.h>
|
||||
#endif
|
||||
namespace Common
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#ifndef _EXI_DEVICEMEMORYCARD_H
|
||||
#define _EXI_DEVICEMEMORYCARD_H
|
||||
|
||||
#include "Thread.h"
|
||||
|
||||
// Data structure to be passed to the flushing thread.
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "Common.h"
|
||||
#include "ChunkFile.h"
|
||||
#include "Thread.h"
|
||||
|
||||
#include "PixelEngine.h"
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "State.h"
|
||||
#include "Core.h"
|
||||
#include "StringUtil.h"
|
||||
#include "Thread.h"
|
||||
#include "CoreTiming.h"
|
||||
#include "HW/HW.h"
|
||||
#include "PowerPC/PowerPC.h"
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#ifndef _STATE_H_
|
||||
#define _STATE_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u8 *buffer;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "Common.h"
|
||||
#include "FileUtil.h"
|
||||
#include "disassemble.h"
|
||||
#include "DSPTables.h"
|
||||
|
@ -34,6 +35,10 @@
|
|||
#pragma warning(disable:4996)
|
||||
#endif
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#include <Windows.h> // For MAX_PATH
|
||||
#endif
|
||||
|
||||
extern void nop(const UDSPInstruction& opc);
|
||||
|
||||
DSPDisassembler::DSPDisassembler(const AssemblerSettings &settings)
|
||||
|
|
|
@ -37,6 +37,11 @@
|
|||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define NOMINMAX
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#include "SDL.h" // Local
|
||||
////////////////////////////////////
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "CommonPaths.h"
|
||||
#include "FileUtil.h"
|
||||
#include "FileSearch.h"
|
||||
#include "StringUtil.h"
|
||||
|
||||
namespace HiresTextures
|
||||
{
|
||||
|
|
|
@ -34,6 +34,7 @@ DSPDebuggerHLE* m_DebuggerFrame = NULL;
|
|||
#include "Setup.h"
|
||||
#include "StringUtil.h"
|
||||
#include "AudioCommon.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
|
||||
// Declarations and definitions
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
|
||||
#include "Common.h" // Common
|
||||
#include "CommonTypes.h"
|
||||
#include "Mixer.h"
|
||||
#include "LogManager.h"
|
||||
#include "Thread.h"
|
||||
#include "ChunkFile.h"
|
||||
|
||||
#include "Globals.h" // Local
|
||||
#include "DSPInterpreter.h"
|
||||
|
@ -28,11 +30,9 @@
|
|||
#include "Config.h"
|
||||
|
||||
#include "AudioCommon.h"
|
||||
#include "Mixer.h"
|
||||
#include "Logging/Logging.h" // For Logging
|
||||
|
||||
#include "Thread.h"
|
||||
#include "ChunkFile.h"
|
||||
|
||||
#include "DSPTables.h"
|
||||
#include "DSPCore.h"
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <math.h>
|
||||
|
||||
#include "Common.h"
|
||||
#include "LogManager.h"
|
||||
#include "pluginspecs_pad.h"
|
||||
#include "PadSimple.h"
|
||||
#include "IniFile.h"
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#include <d3dx9.h>
|
||||
|
||||
#include "Common.h"
|
||||
#include "Thread.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
#include "svnrev.h"
|
||||
#include "resource.h"
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
#include "Common.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
// Log in two categories, and save three other options in the same byte
|
||||
#define CONF_LOG 1
|
||||
#define CONF_PRIMLOG 2
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
|
||||
#include "Globals.h"
|
||||
#include "Thread.h"
|
||||
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
|
|
@ -52,6 +52,8 @@ Make AA apply instantly during gameplay if possible
|
|||
|
||||
|
||||
#include "Globals.h"
|
||||
#include "LogManager.h"
|
||||
#include "Thread.h"
|
||||
|
||||
#include <cstdarg>
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ and Wiimote functions worked.
|
|||
*/
|
||||
|
||||
#include "Common.h" // Common
|
||||
#include "LogManager.h"
|
||||
#include "StringUtil.h"
|
||||
#include "Timer.h"
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
// Include
|
||||
// ¯¯¯¯¯¯¯¯¯
|
||||
#include "nJoy.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
// Declare config window so that we can write debugging info to it from functions in this file
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "nJoy.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Variables
|
||||
|
|
Loading…
Reference in New Issue