From 619c90e81cb35f03659ae5025ec8482b2ac3e611 Mon Sep 17 00:00:00 2001 From: cyberwarriorx Date: Fri, 14 Apr 2006 00:32:35 +0000 Subject: [PATCH] -Changed code to use Yabause's logging system, fixed a few odd things --- desmume/src/Makefile.am | 2 +- desmume/src/config.h | 2 +- desmume/src/debug.h | 32 +++++++++++++++++++++++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/desmume/src/Makefile.am b/desmume/src/Makefile.am index a30e2c57d..f3adfba77 100644 --- a/desmume/src/Makefile.am +++ b/desmume/src/Makefile.am @@ -5,6 +5,6 @@ libdesmume_a_SOURCES = \ arm_instructions.cpp arm_instructions.hpp \ bios.cpp bios.hpp cp15.cpp cp15.hpp \ Disassembler.cpp Disassembler.hpp \ - GPU.cpp GPU.hpp log.cpp log.hpp \ + GPU.cpp GPU.hpp debug.c debug.h \ MMU.cpp MMU.hpp NDSSystem.cpp NDSSystem.hpp \ thumb_instructions.cpp thumb_instructions.hpp diff --git a/desmume/src/config.h b/desmume/src/config.h index 0cf1b3de7..4e98d421d 100644 --- a/desmume/src/config.h +++ b/desmume/src/config.h @@ -3,7 +3,7 @@ #include -#include "log.h" +#include "debug.h" #endif /*__CONFIG_H__*/ diff --git a/desmume/src/debug.h b/desmume/src/debug.h index ab11c00a6..f35439832 100644 --- a/desmume/src/debug.h +++ b/desmume/src/debug.h @@ -1,7 +1,7 @@ #ifndef DEBUG_H #define DEBUG_H -#include "core.h" +#include "types.h" #include typedef enum { DEBUG_STRING, DEBUG_STREAM , DEBUG_STDOUT, DEBUG_STDERR } DebugOutType; @@ -33,4 +33,34 @@ void LogStop(void); #define LOG(f, r...) #endif +#ifdef GPUDEBUG +#define GPULOG(f, r...) DebugPrintf(MainLog, __FILE__, __LINE__, f, ## r) +#else +#define GPULOG(f, r...) +#endif + +#ifdef DIVDEBUG +#define DIVLOG(f, r...) DebugPrintf(MainLog, __FILE__, __LINE__, f, ## r) +#else +#define DIVLOG(f, r...) +#endif + +#ifdef SQRTDEBUG +#define SQRTLOG(f, r...) DebugPrintf(MainLog, __FILE__, __LINE__, f, ## r) +#else +#define SQRTLOG(f, r...) +#endif + +#ifdef CARDDEBUG +#define CARDLOG(f, r...) DebugPrintf(MainLog, __FILE__, __LINE__, f, ## r) +#else +#define CARDLOG(f, r...) +#endif + +#ifdef DMADEBUG +#define DMALOG(f, r...) DebugPrintf(MainLog, __FILE__, __LINE__, f, ## r) +#else +#define DMALOG(f, r...) +#endif + #endif