Properly get error message for eglInitialize

If eglInitialize returns EGL_FALSE we should print a warning and try
to get the error code.
icc-effect-5.14.5
Martin Gräßlin 2016-07-15 10:04:39 +02:00
parent 70167b748d
commit aa7fb81e00
1 changed files with 5 additions and 0 deletions

View File

@ -80,6 +80,11 @@ bool AbstractEglBackend::initEglAPI()
{
EGLint major, minor;
if (eglInitialize(m_display, &major, &minor) == EGL_FALSE) {
qCWarning(KWIN_CORE) << "eglInitialize failed";
EGLint error = eglGetError();
if (error != EGL_SUCCESS) {
qCWarning(KWIN_CORE) << "Error during eglInitialize " << error;
}
return false;
}
EGLint error = eglGetError();