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, ...) {