mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
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:
parent
e6d012d05d
commit
28ca4cd795
21 changed files with 454 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue