Starting work on Android port
This commit is contained in:
parent
5d1b7678f0
commit
ab13ccd595
183 changed files with 6790 additions and 906 deletions
|
|
@ -1,5 +1,9 @@
|
|||
#include "Logger.hpp"
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
#ifdef __ANDROID__
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
Logger Logger::global;
|
||||
|
||||
|
|
@ -20,3 +24,11 @@ void Logger::log(const std::string& log, const std::string& text) {
|
|||
else
|
||||
it->second(text);
|
||||
}
|
||||
|
||||
void Logger::cross_platform_println(const std::string& text) {
|
||||
#ifdef __ANDROID__
|
||||
__android_log_print(ANDROID_LOG_INFO, "Logger", "%s", text.c_str());
|
||||
#else
|
||||
std::cout << text << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue