From: retro-wertz Date: Fri, 2 Aug 2019 10:51:32 +0000 (+0800) Subject: Use retro_log for SysPrintf X-Git-Tag: r24l~707^2~4 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=130984f52889f26121d54d7b1feecc15700a0f7a;p=pcsx_rearmed.git Use retro_log for SysPrintf --- diff --git a/frontend/libretro.c b/frontend/libretro.c index e48069a9..b8d17ab9 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -2286,3 +2286,15 @@ int usleep (unsigned long us) sceKernelDelayThread(us); } #endif + +void SysPrintf(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_INFO, "%s", msg); +} diff --git a/frontend/main.c b/frontend/main.c index 860dec0d..c0bfd0fd 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -795,6 +795,7 @@ int emu_load_state(int slot) return LoadState(fname); } +#ifndef HAVE_LIBRETRO #ifndef ANDROID void SysPrintf(const char *fmt, ...) { @@ -819,6 +820,7 @@ void SysPrintf(const char *fmt, ...) { } #endif +#endif /* HAVE_LIBRETRO */ void SysMessage(const char *fmt, ...) { va_list list;