winex11: Remove useless checks from wglCreateContext.

This commit is contained in:
Chris Robinson 2007-09-11 13:55:11 -07:00 committed by Alexandre Julliard
parent 57380c2d9a
commit e46d621bb6
1 changed files with 0 additions and 18 deletions

View File

@ -1416,8 +1416,6 @@ HGLRC X11DRV_wglCreateContext(X11DRV_PDEVICE *physDev)
WineGLPixelFormat *fmt; WineGLPixelFormat *fmt;
int hdcPF = physDev->current_pf; int hdcPF = physDev->current_pf;
int fmt_count = 0; int fmt_count = 0;
int value = 0;
int gl_test = 0;
HDC hdc = physDev->hdc; HDC hdc = physDev->hdc;
TRACE("(%p)->(PF:%d)\n", hdc, hdcPF); TRACE("(%p)->(PF:%d)\n", hdc, hdcPF);
@ -1427,9 +1425,6 @@ HGLRC X11DRV_wglCreateContext(X11DRV_PDEVICE *physDev)
return 0; 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); 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. /* 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 * 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; 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 */ /* The context will be allocated in the wglMakeCurrent call */
wine_tsx11_lock(); wine_tsx11_lock();
ret = alloc_context(); ret = alloc_context();