76 lines
1.8 KiB
Diff
76 lines
1.8 KiB
Diff
diff -uNr SDL2-2.0.8/src/SDL_log.c SDL2-2.0.8.mod/src/SDL_log.c
|
|
--- SDL2-2.0.8/src/SDL_log.c 2018-03-01 18:34:42.000000000 +0200
|
|
+++ SDL2-2.0.8.mod/src/SDL_log.c 2018-09-07 16:13:56.483571544 +0300
|
|
@@ -33,9 +33,6 @@
|
|
#include <stdio.h>
|
|
#endif
|
|
|
|
-#if defined(__ANDROID__)
|
|
-#include <android/log.h>
|
|
-#endif
|
|
|
|
#define DEFAULT_PRIORITY SDL_LOG_PRIORITY_CRITICAL
|
|
#define DEFAULT_ASSERT_PRIORITY SDL_LOG_PRIORITY_WARN
|
|
@@ -70,27 +67,6 @@
|
|
"CRITICAL"
|
|
};
|
|
|
|
-#ifdef __ANDROID__
|
|
-static const char *SDL_category_prefixes[SDL_LOG_CATEGORY_RESERVED1] = {
|
|
- "APP",
|
|
- "ERROR",
|
|
- "SYSTEM",
|
|
- "AUDIO",
|
|
- "VIDEO",
|
|
- "RENDER",
|
|
- "INPUT"
|
|
-};
|
|
-
|
|
-static int SDL_android_priority[SDL_NUM_LOG_PRIORITIES] = {
|
|
- ANDROID_LOG_UNKNOWN,
|
|
- ANDROID_LOG_VERBOSE,
|
|
- ANDROID_LOG_DEBUG,
|
|
- ANDROID_LOG_INFO,
|
|
- ANDROID_LOG_WARN,
|
|
- ANDROID_LOG_ERROR,
|
|
- ANDROID_LOG_FATAL
|
|
-};
|
|
-#endif /* __ANDROID__ */
|
|
|
|
|
|
void
|
|
@@ -247,19 +223,6 @@
|
|
va_end(ap);
|
|
}
|
|
|
|
-#ifdef __ANDROID__
|
|
-static const char *
|
|
-GetCategoryPrefix(int category)
|
|
-{
|
|
- if (category < SDL_LOG_CATEGORY_RESERVED1) {
|
|
- return SDL_category_prefixes[category];
|
|
- }
|
|
- if (category < SDL_LOG_CATEGORY_CUSTOM) {
|
|
- return "RESERVED";
|
|
- }
|
|
- return "CUSTOM";
|
|
-}
|
|
-#endif /* __ANDROID__ */
|
|
|
|
void
|
|
SDL_LogMessageV(int category, SDL_LogPriority priority, const char *fmt, va_list ap)
|
|
@@ -391,13 +354,6 @@
|
|
SDL_free(tstr);
|
|
SDL_stack_free(output);
|
|
}
|
|
-#elif defined(__ANDROID__)
|
|
- {
|
|
- char tag[32];
|
|
-
|
|
- SDL_snprintf(tag, SDL_arraysize(tag), "SDL/%s", GetCategoryPrefix(category));
|
|
- __android_log_write(SDL_android_priority[priority], tag, message);
|
|
- }
|
|
#elif defined(__APPLE__) && defined(SDL_VIDEO_DRIVER_COCOA)
|
|
/* Technically we don't need SDL_VIDEO_DRIVER_COCOA, but that's where this function is defined for now.
|
|
*/
|