From 90bc79f299e5a96a1c05c7cc50f93a7ab12b3193 Mon Sep 17 00:00:00 2001 From: retro-wertz Date: Sat, 16 Jun 2018 15:55:26 +0800 Subject: [PATCH] Libretro: implement vbam logging using libretro logging api --- src/libretro/libretro.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/libretro/libretro.cpp b/src/libretro/libretro.cpp index 6aeffc44..11b38fad 100644 --- a/src/libretro/libretro.cpp +++ b/src/libretro/libretro.cpp @@ -1042,3 +1042,15 @@ SoundDriver* systemSoundInit() soundShutdown(); return new SoundRetro(); } + +void log(const char* defaultMsg, ...) +{ + va_list valist; + char buf[2048]; + va_start(valist, defaultMsg); + vsnprintf(buf, 2048, defaultMsg, valist); + va_end(valist); + + if (log_cb) + log_cb(RETRO_LOG_INFO, "%s", buf); +}