only check if iso path is not empty on android, split log messages by newlines to prevent truncation

SDL_GetPathInfo doesnt seem able to get valid info from android, or theres some weird permission thing going on
This commit is contained in:
CraftyBoss
2026-04-10 18:35:40 -07:00
parent d01f6bafff
commit 4ec4cd363e
2 changed files with 19 additions and 1 deletions
+15 -1
View File
@@ -63,7 +63,21 @@ void aurora_log_callback(AuroraLogLevel level, const char* module, const char* m
android_log_level = ANDROID_LOG_FATAL;
break;
}
__android_log_print(android_log_level, module, "%s\n", message);
const char* start = message;
const char* end = message + len;
while (start < end) {
const char* newline = static_cast<const char*>(memchr(start, '\n', end - start));
if (!newline) {
__android_log_print(android_log_level, module, "%.*s", static_cast<int>(end - start), start);
break;
}
if (newline > start) {
__android_log_print(android_log_level, module, "%.*s", static_cast<int>(newline - start), start);
}
start = newline + 1;
}
if (level == LOG_FATAL) {
abort();
}