Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-libdrm: Commit

external/libdrm


Commit MetaInfo

Révision834f73c8957ada0b09c147d910af38e597edd0ab (tree)
l'heure2019-10-18 03:11:23
AuteurChih-Wei Huang <cwhuang@linu...>
CommiterMauro Rossi

Message de Log

Android: redirect debug messages to logcat

Change Summary

Modification

--- a/Android.mk
+++ b/Android.mk
@@ -102,6 +102,7 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
102102 $(LOCAL_PATH)/android
103103
104104 LOCAL_SHARED_LIBRARIES := \
105+ liblog \
105106 libcutils
106107
107108 LOCAL_C_INCLUDES := \
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -71,6 +71,10 @@
7171
7272 #include "util_math.h"
7373
74+#ifdef __ANDROID__
75+#include <log/log.h>
76+#endif
77+
7478 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
7579 #define DRM_MAJOR 145
7680 #endif
@@ -130,16 +134,22 @@ drm_public void drmSetServerInfo(drmServerInfoPtr info)
130134 static int DRM_PRINTFLIKE(1, 0)
131135 drmDebugPrint(const char *format, va_list ap)
132136 {
137+#ifdef __ANDROID__
138+ return __android_log_vprint(ANDROID_LOG_DEBUG, "libdrm", format, ap);
139+#else
133140 return vfprintf(stderr, format, ap);
141+#endif
134142 }
135143
136144 drm_public void
137145 drmMsg(const char *format, ...)
138146 {
139147 va_list ap;
148+#ifndef __ANDROID__
140149 const char *env;
141150 if (((env = getenv("LIBGL_DEBUG")) && strstr(env, "verbose")) ||
142151 (drm_server_info && drm_server_info->debug_print))
152+#endif
143153 {
144154 va_start(ap, format);
145155 if (drm_server_info) {
Afficher sur ancien navigateur de dépôt.