Properly get error message for eglInitialize

If eglInitialize returns EGL_FALSE we should print a warning and try
to get the error code.
This commit is contained in:
Martin Gräßlin 2016-07-15 10:04:39 +02:00
parent 70167b748d
commit aa7fb81e00

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();