termux-packages/x11-packages/sdl2/SDL2-2.0.8_src_SDL_log.c.patch
Leonid Pliushch 46768830ae
fix names for more packages
Now x11-packages repository will use original names for
packages. For example, libgtk2 now will be provided as
gtk2, libgtk3 will be available as gtk3, libsdl - as sdl.

List of changed packages:

 libatk        --> atk
 libglu        --> glu
 libgtk2       --> gtk2
 libgtk3       --> gtk3
 libmesa       --> mesa
 libsdl        --> sdl
 libsdl2       --> sdl2
 libsdl-net    --> sdl-net
 riscvemu-sdl  --> riscvemu
 xorg-xvfb     --> xorg-server-xvfb

List of dependent packages (should be rebuilt with new deps):

 dosbox, emacs-x, galculator, geany, libepoxy, mtpaint,
 qemu-system-x86_64, the-powder-toy, tigervnc, wireshark-gtk,
 xarchiver.

Note: depending on which packages are installed, it may be
necessary to upgrade with 'apt dist-upgrade'.
2022-04-18 14:08:23 +05:30

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.
*/