From eb3e08e388375e871d2464541b909290b2c75f4c Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 19 Feb 2011 11:23:56 -0800 Subject: [PATCH] Added missing log debug function --- include/SDL_log.h | 5 +++++ src/SDL_log.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/include/SDL_log.h b/include/SDL_log.h index de4fd4196..615258de7 100644 --- a/include/SDL_log.h +++ b/include/SDL_log.h @@ -143,6 +143,11 @@ extern DECLSPEC void SDLCALL SDL_Log(const char *fmt, ...); */ extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, const char *fmt, ...); +/** + * \brief Log a message with SDL_LOG_PRIORITY_DEBUG + */ +extern DECLSPEC void SDLCALL SDL_LogDebug(int category, const char *fmt, ...); + /** * \brief Log a message with SDL_LOG_PRIORITY_INFO */ diff --git a/src/SDL_log.c b/src/SDL_log.c index 8f384a08e..f87a9e7df 100644 --- a/src/SDL_log.c +++ b/src/SDL_log.c @@ -174,6 +174,16 @@ SDL_LogVerbose(int category, const char *fmt, ...) va_end(ap); } +void +SDL_LogDebug(int category, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + SDL_LogMessageV(category, SDL_LOG_PRIORITY_DEBUG, fmt, ap); + va_end(ap); +} + void SDL_LogInfo(int category, const char *fmt, ...) {