From: negativeExponent Date: Sun, 2 Aug 2020 23:58:26 +0000 (+0800) Subject: Add debug-level log function X-Git-Tag: r24l~631^2~1 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d23e64c18b3306f9cd95372745bed7172639720e;p=pcsx_rearmed.git Add debug-level log function --- diff --git a/frontend/libretro.c b/frontend/libretro.c index 50392a9c..a8895d83 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -2885,3 +2885,17 @@ void SysPrintf(const char *fmt, ...) if (log_cb) log_cb(RETRO_LOG_INFO, "%s", msg); } + +/* Prints debug-level logs */ +void SysDLog(const char *fmt, ...) +{ + va_list list; + char msg[512]; + + va_start(list, fmt); + vsprintf(msg, fmt, list); + va_end(list); + + if (log_cb) + log_cb(RETRO_LOG_DEBUG, "%s", msg); +} diff --git a/libpcsxcore/system.h b/libpcsxcore/system.h index c869fdf1..cd1814c2 100644 --- a/libpcsxcore/system.h +++ b/libpcsxcore/system.h @@ -35,6 +35,7 @@ void SysCloseLibrary(void *lib); // Closes Library void SysUpdate(); // Called on VBlank (to update i.e. pads) void SysRunGui(); // Returns to the Gui void SysClose(); // Close mem and plugins +void SysDLog(const char *fmt, ...); // Prints debug-level logs #ifdef __cplusplus }