If the EGL_PLATFORM is not set, then set it
authorJørgen Lind <jorgen.lind@nokia.com>
Wed, 24 Aug 2011 08:38:31 +0000 (10:38 +0200)
committerPaul Olav Tvete <paul.tvete@nokia.com>
Wed, 24 Aug 2011 08:43:49 +0000 (10:43 +0200)
Change-Id: I6c1b0ba757c64fc42faacd69d4e5d1df28faf7d1
Reviewed-on: http://codereview.qt.nokia.com/3472
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
src/plugins/platforms/wayland/gl_integration/wayland_egl/qwaylandeglintegration.cpp

index ab15401..6e72a45 100644 (file)
@@ -62,6 +62,11 @@ QWaylandEglIntegration::~QWaylandEglIntegration()
 
 void QWaylandEglIntegration::initialize()
 {
+    QByteArray eglPlatform = qgetenv("EGL_PLATFORM");
+    if (eglPlatform.isEmpty()) {
+        setenv("EGL_PLATFORM","wayland",true);
+    }
+
     EGLint major,minor;
     m_eglDisplay = eglGetDisplay(m_waylandDisplay);
     if (m_eglDisplay == NULL) {