Commit a86d5e11 by Nicolas Capens

Fix eglGetDisplay(EGL_DEFAULT_DISPLAY) on Linux.

parent c844fec7
......@@ -31,23 +31,21 @@ DisplayMap displays;
egl::Display *Display::getDisplay(EGLNativeDisplayType displayId)
{
if(displays.find(displayId) != displays.end())
if(displayId == EGL_DEFAULT_DISPLAY)
{
return displays[displayId];
#if defined(__unix__)
displayId = XOpenDisplay(NULL);
#endif
}
egl::Display *display = NULL;
if(displayId == EGL_DEFAULT_DISPLAY)
if(displays.find(displayId) != displays.end())
{
display = new egl::Display(displayId);
return displays[displayId];
}
else
{
// FIXME: Check if displayId is a valid display device context
display = new egl::Display(displayId);
}
egl::Display *display = new egl::Display(displayId);
displays[displayId] = display;
return display;
......
......@@ -89,6 +89,7 @@
</Target>
</Build>
<Compiler>
<Add option="-std=c++11" />
<Add option="-Wall" />
<Add option="-fexceptions" />
<Add directory="./../include/" />
......
......@@ -102,6 +102,7 @@
</Target>
</Build>
<Compiler>
<Add option="-std=c++11" />
<Add option="-Wall" />
<Add option="-fexceptions" />
<Add option="-fno-operator-names" />
......
......@@ -59,6 +59,7 @@
</Target>
</Build>
<Compiler>
<Add option="-std=c++11" />
<Add option="-Wall" />
<Add option="-fexceptions" />
<Add directory="../../../../../Builds/Include" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment