Do not do any GLX calls on a display that does not support GLX.
This commit is contained in:
parent
89d4472d46
commit
81b7208eee
|
@ -147,8 +147,11 @@ static void create_desktop( const char *geometry )
|
||||||
XVisualInfo *vi = NULL;
|
XVisualInfo *vi = NULL;
|
||||||
#ifdef HAVE_OPENGL
|
#ifdef HAVE_OPENGL
|
||||||
BOOL dblbuf_visual;
|
BOOL dblbuf_visual;
|
||||||
|
int err_base, evt_base;
|
||||||
|
|
||||||
/* Get in wine.ini if the desktop window should have a double-buffered visual or not */
|
/* Get in wine.ini if the desktop window should have a double-buffered visual or not.
|
||||||
|
But first, test if OpenGL is even supported on the display ! */
|
||||||
|
if (glXQueryExtension(display, &err_base, &evt_base) == True) {
|
||||||
dblbuf_visual = PROFILE_GetWineIniBool( "x11drv", "DesktopDoubleBuffered", 0 );
|
dblbuf_visual = PROFILE_GetWineIniBool( "x11drv", "DesktopDoubleBuffered", 0 );
|
||||||
if (dblbuf_visual) {
|
if (dblbuf_visual) {
|
||||||
int dblBuf[]={GLX_RGBA,GLX_DEPTH_SIZE,16,GLX_DOUBLEBUFFER,None};
|
int dblBuf[]={GLX_RGBA,GLX_DEPTH_SIZE,16,GLX_DOUBLEBUFFER,None};
|
||||||
|
@ -159,6 +162,7 @@ static void create_desktop( const char *geometry )
|
||||||
vi->visual, AllocNone);
|
vi->visual, AllocNone);
|
||||||
LEAVE_GL();
|
LEAVE_GL();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif /* HAVE_OPENGL */
|
#endif /* HAVE_OPENGL */
|
||||||
|
|
||||||
flags = TSXParseGeometry( geometry, &x, &y, &width, &height );
|
flags = TSXParseGeometry( geometry, &x, &y, &width, &height );
|
||||||
|
|
Loading…
Reference in New Issue