summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/main/eglcurrent.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/egl/main/eglcurrent.h b/src/egl/main/eglcurrent.h
index 1e386acdafb..3f8a0b28e38 100644
--- a/src/egl/main/eglcurrent.h
+++ b/src/egl/main/eglcurrent.h
@@ -69,7 +69,13 @@ struct _egl_thread_info
static inline EGLBoolean
_eglIsApiValid(EGLenum api)
{
- return (api >= _EGL_API_FIRST_API && api <= _EGL_API_LAST_API);
+#ifdef ANDROID
+ /* OpenGL is not a valid/supported API on Android */
+ return api >= _EGL_API_FIRST_API && api <= _EGL_API_LAST_API &&
+ api != EGL_OPENGL_API;
+#else
+ return api >= _EGL_API_FIRST_API && api <= _EGL_API_LAST_API;
+#endif
}