Do not do any GLX calls on a display that does not support GLX.

This commit is contained in:
Lionel Ulmer 2000-10-19 20:22:36 +00:00 committed by Alexandre Julliard
parent 89d4472d46
commit 81b7208eee
1 changed files with 15 additions and 11 deletions

View File

@ -147,8 +147,11 @@ static void create_desktop( const char *geometry )
XVisualInfo *vi = NULL;
#ifdef HAVE_OPENGL
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 );
if (dblbuf_visual) {
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);
LEAVE_GL();
}
}
#endif /* HAVE_OPENGL */
flags = TSXParseGeometry( geometry, &x, &y, &width, &height );