this patch is a partial revert of 1ce5853 that break compilation since LOG_ERROR etc are not defined and also macro expansion won't work as planned (expands to 'ANDROID_egl2alog[level]')
Fixes: 1ce5853 ("egl: simplify the Android logger") Signed-off-by: Tapani Pälli <tapani.pa...@intel.com> --- src/egl/main/egllog.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/egl/main/egllog.c b/src/egl/main/egllog.c index 6de2a50..51ab76f 100644 --- a/src/egl/main/egllog.c +++ b/src/egl/main/egllog.c @@ -81,13 +81,20 @@ static void _eglDefaultLogger(EGLint level, const char *msg) { #ifdef HAVE_ANDROID_PLATFORM - static const int egl2alog[] = { - [_EGL_FATAL] = LOG_ERROR, - [_EGL_WARNING] = LOG_WARN, - [_EGL_INFO] = LOG_INFO, - [_EGL_DEBUG] = LOG_DEBUG, - }; - ALOG(egl2alog[level], LOG_TAG, "%s", msg); + switch (level) { + case _EGL_FATAL: + ALOGE("%s", msg); + break; + case _EGL_WARNING: + ALOGW("%s", msg); + break; + case _EGL_INFO: + ALOGI("%s", msg); + break; + case _EGL_DEBUG: + ALOGD("%s", msg); + break; + } #else fprintf(stderr, "libEGL %s: %s\n", level_strings[level], msg); #endif /* HAVE_ANDROID_PLATFORM */ -- 2.9.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev