diff options
-rw-r--r-- | Alc/ALc.c | 10 | ||||
-rw-r--r-- | OpenAL32/Include/alMain.h | 8 |
2 files changed, 12 insertions, 6 deletions
@@ -566,7 +566,7 @@ static void alc_initconfig(void) if(str) { long lvl = strtol(str, NULL, 0); - if(lvl >= NoLog && lvl <= LogTrace) + if(lvl >= NoLog && lvl <= LogRef) LogLevel = lvl; } @@ -1298,14 +1298,14 @@ void ALCdevice_IncRef(ALCdevice *device) { RefCount ref; ref = IncrementRef(&device->ref); - TRACE("%p increasing refcount to %u\n", device, ref); + TRACEREF("%p increasing refcount to %u\n", device, ref); } void ALCdevice_DecRef(ALCdevice *device) { RefCount ref; ref = DecrementRef(&device->ref); - TRACE("%p decreasing refcount to %u\n", device, ref); + TRACEREF("%p decreasing refcount to %u\n", device, ref); if(ref == 0) FreeDevice(device); } @@ -1471,14 +1471,14 @@ void ALCcontext_IncRef(ALCcontext *context) { RefCount ref; ref = IncrementRef(&context->ref); - TRACE("%p increasing refcount to %u\n", context, ref); + TRACEREF("%p increasing refcount to %u\n", context, ref); } void ALCcontext_DecRef(ALCcontext *context) { RefCount ref; ref = DecrementRef(&context->ref); - TRACE("%p decreasing refcount to %u\n", context, ref); + TRACEREF("%p decreasing refcount to %u\n", context, ref); if(ref == 0) FreeContext(context); } diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 5ee90db6..719354f2 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -701,10 +701,16 @@ enum LogLevel { NoLog, LogError, LogWarning, - LogTrace + LogTrace, + LogRef }; extern enum LogLevel LogLevel; +#define TRACEREF(...) do { \ + if(LogLevel >= LogRef) \ + AL_PRINT(__VA_ARGS__); \ +} while(0) + #define TRACE(...) do { \ if(LogLevel >= LogTrace) \ AL_PRINT(__VA_ARGS__); \ |