Commit e46d621b authored by Chris Robinson's avatar Chris Robinson Committed by Alexandre Julliard

winex11: Remove useless checks from wglCreateContext.

parent 57380c2d
......@@ -1416,8 +1416,6 @@ HGLRC X11DRV_wglCreateContext(X11DRV_PDEVICE *physDev)
WineGLPixelFormat *fmt;
int hdcPF = physDev->current_pf;
int fmt_count = 0;
int value = 0;
int gl_test = 0;
HDC hdc = physDev->hdc;
TRACE("(%p)->(PF:%d)\n", hdc, hdcPF);
......@@ -1427,9 +1425,6 @@ HGLRC X11DRV_wglCreateContext(X11DRV_PDEVICE *physDev)
return 0;
}
/* First, get the visual in use by the X11DRV */
if (!gdi_display) return 0;
fmt = ConvertPixelFormatWGLtoGLX(gdi_display, hdcPF, TRUE /* Offscreen */, &fmt_count);
/* We can render using the iPixelFormat (1) of Wine's Main visual AND using some offscreen formats.
* Note that standard WGL-calls don't recognize offscreen-only formats. For that reason pbuffers
......@@ -1441,19 +1436,6 @@ HGLRC X11DRV_wglCreateContext(X11DRV_PDEVICE *physDev)
return NULL;
}
if (fmt_count < hdcPF) {
ERR("(%p): unexpected pixelFormat(%d) > nFormats(%d), returns NULL\n", hdc, hdcPF, fmt_count);
SetLastError(ERROR_INVALID_PIXEL_FORMAT);
return NULL;
}
gl_test = pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_FBCONFIG_ID, &value);
if (gl_test) {
ERR("Failed to retrieve FBCONFIG_ID from GLXFBConfig, expect problems.\n");
SetLastError(ERROR_INVALID_PIXEL_FORMAT);
return NULL;
}
/* The context will be allocated in the wglMakeCurrent call */
wine_tsx11_lock();
ret = alloc_context();
......
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