From 663994872ec8dd49010856261dba12da1ed6b9ba Mon Sep 17 00:00:00 2001 From: taeyoon Date: Mon, 4 May 2015 16:47:08 +0900 Subject: [PATCH] Add exception for unsupported EGL or DDK Change-Id: I70fbb1397125206c4379a24a6f75fb7a9c8d9870 --- adaptors/wayland/egl-implementation-wl.cpp | 6 ++++++ adaptors/x11/egl-implementation-x.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/adaptors/wayland/egl-implementation-wl.cpp b/adaptors/wayland/egl-implementation-wl.cpp index 3e721f1..fcbfe63 100644 --- a/adaptors/wayland/egl-implementation-wl.cpp +++ b/adaptors/wayland/egl-implementation-wl.cpp @@ -76,6 +76,12 @@ bool EglImplementation::InitializeGles( EGLNativeDisplayType display, bool isOwn //@todo see if we can just EGL_DEFAULT_DISPLAY instead mEglDisplay = eglGetDisplay(mEglNativeDisplay); + EGLint error = eglGetError(); + + if( mEglDisplay == NULL && error != EGL_SUCCESS ) + { + throw Dali::DaliException( "", "OpenGL ES is not supported" ); + } EGLint majorVersion = 0; EGLint minorVersion = 0; diff --git a/adaptors/x11/egl-implementation-x.cpp b/adaptors/x11/egl-implementation-x.cpp index fc3979e..07b01d5 100644 --- a/adaptors/x11/egl-implementation-x.cpp +++ b/adaptors/x11/egl-implementation-x.cpp @@ -76,6 +76,12 @@ bool EglImplementation::InitializeGles( EGLNativeDisplayType display, bool isOwn //@todo see if we can just EGL_DEFAULT_DISPLAY instead mEglDisplay = eglGetDisplay(mEglNativeDisplay); + EGLint error = eglGetError(); + + if( mEglDisplay == NULL && error != EGL_SUCCESS ) + { + throw Dali::DaliException( "", "OpenGL ES is not supported"); + } EGLint majorVersion = 0; EGLint minorVersion = 0; -- 2.7.4