From 130640152c45b7e2ab679263f6bdbc9560afac5c Mon Sep 17 00:00:00 2001 From: gabriel Date: Thu, 1 Feb 2024 10:29:08 -0400 Subject: [PATCH] Native logger --- include/logger.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/logger.hpp b/include/logger.hpp index 82d90410..25074aea 100644 --- a/include/logger.hpp +++ b/include/logger.hpp @@ -2,6 +2,10 @@ #include #include +#ifdef __ANDROID__ +#include +#endif + namespace Log { // Our logger class template @@ -11,8 +15,12 @@ namespace Log { if constexpr (!enabled) return; std::va_list args; - va_start(args, fmt); - std::vprintf(fmt, args); + va_start(args, fmt); + #ifdef __ANDROID__ + __android_log_vprint(ANDROID_LOG_DEFAULT, "Panda3DS", fmt, args); + #else + std::vprintf(fmt, args); + #endif va_end(args); } };