Starting work on Android port

This commit is contained in:
Yousef Khadadeh 2026-02-24 17:21:41 +03:00
parent 5d1b7678f0
commit ab13ccd595
183 changed files with 6790 additions and 906 deletions

View file

@ -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
}