Logger (#397)
* Initial commit * add shader-jit option * add translate to word "graphics' for ptbr * Native logger * Bonk * fix --------- Co-authored-by: gabriel <gabriel> Co-authored-by: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
#include <cstdarg>
|
||||
#include <fstream>
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
namespace Log {
|
||||
// Our logger class
|
||||
template <bool enabled>
|
||||
@@ -12,7 +16,11 @@ namespace Log {
|
||||
|
||||
std::va_list 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);
|
||||
}
|
||||
};
|
||||
@@ -81,4 +89,4 @@ namespace Log {
|
||||
#else
|
||||
#define MAKE_LOG_FUNCTION(functionName, logger) MAKE_LOG_FUNCTION_USER(functionName, logger)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user