Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-libdrm: Commit

external/libdrm


Commit MetaInfo

Révisionf215df61ba074c25ff88ee73850902668641551a (tree)
l'heure2019-10-04 18:15:44
AuteurChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Message de Log

Android: redirect debug messages to logcat

Change Summary

Modification

--- a/Android.bp
+++ b/Android.bp
@@ -64,4 +64,5 @@ cc_library {
6464 "-Wno-sign-compare",
6565 "-Wno-tautological-compare",
6666 ],
67+ shared_libs: ["liblog"],
6768 }
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -69,6 +69,10 @@
6969
7070 #include "util_math.h"
7171
72+#ifdef __ANDROID__
73+#include <log/log.h>
74+#endif
75+
7276 #ifdef __OpenBSD__
7377 #define DRM_PRIMARY_MINOR_NAME "drm"
7478 #define DRM_CONTROL_MINOR_NAME "drmC"
@@ -138,16 +142,22 @@ drm_public void drmSetServerInfo(drmServerInfoPtr info)
138142 static int DRM_PRINTFLIKE(1, 0)
139143 drmDebugPrint(const char *format, va_list ap)
140144 {
145+#ifdef __ANDROID__
146+ return __android_log_vprint(ANDROID_LOG_DEBUG, "libdrm", format, ap);
147+#else
141148 return vfprintf(stderr, format, ap);
149+#endif
142150 }
143151
144152 drm_public void
145153 drmMsg(const char *format, ...)
146154 {
147155 va_list ap;
156+#ifndef __ANDROID__
148157 const char *env;
149158 if (((env = getenv("LIBGL_DEBUG")) && strstr(env, "verbose")) ||
150159 (drm_server_info && drm_server_info->debug_print))
160+#endif
151161 {
152162 va_start(ap, format);
153163 if (drm_server_info) {
Afficher sur ancien navigateur de dépôt.