From dfd0759ff635c2734104f63518f63efd2345cdc4 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Fri, 5 Nov 2010 12:41:51 +0100 Subject: [PATCH] Refresh EGL header to work with the NDK This change allows to use this header with the NDK's standalone toolchain. For the record, the NDK toolchain defines __ANDROID__ as a compiler built-in macro, this is however not the case currently for the prebuilt binaries that are being used by the full Android build system, which otherwise defines ANDROID. This change allows the header to be used by all toolchains properly. Note however that we should properly should change our toolchain and sources to provide and rely on __ANDROID__ instead of ANDROID though. Change-Id: Iaa1aa1146985b5f24dcf3a83d9ddb9b4b59dc328 --- opengl/include/EGL/eglplatform.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/opengl/include/EGL/eglplatform.h b/opengl/include/EGL/eglplatform.h index 25d7697ee..bfac71bec 100644 --- a/opengl/include/EGL/eglplatform.h +++ b/opengl/include/EGL/eglplatform.h @@ -78,18 +78,7 @@ typedef int EGLNativeDisplayType; typedef void *EGLNativeWindowType; typedef void *EGLNativePixmapType; -#elif defined(__unix__) && !defined(ANDROID) - -/* X11 (tentative) */ -#include -#include - -typedef Display *EGLNativeDisplayType; -typedef Pixmap EGLNativePixmapType; -typedef Window EGLNativeWindowType; - - -#elif defined(ANDROID) +#elif defined(__ANDROID__) || defined(ANDROID) #include @@ -99,6 +88,16 @@ typedef struct ANativeWindow* EGLNativeWindowType; typedef struct egl_native_pixmap_t* EGLNativePixmapType; typedef void* EGLNativeDisplayType; +#elif defined(__unix__) + +/* X11 (tentative) */ +#include +#include + +typedef Display *EGLNativeDisplayType; +typedef Pixmap EGLNativePixmapType; +typedef Window EGLNativeWindowType; + #else #error "Platform not recognized" #endif