Chris Robinson : winex11: Remove useless checks from wglCreateContext.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Sep 12 07:50:52 CDT 2007
Module: wine
Branch: master
Commit: e46d621bb6c80752afb4d209092f5a31f41423ea
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e46d621bb6c80752afb4d209092f5a31f41423ea
Author: Chris Robinson <chris.kcat at gmail.com>
Date: Tue Sep 11 13:55:11 2007 -0700
winex11: Remove useless checks from wglCreateContext.
---
dlls/winex11.drv/opengl.c | 18 ------------------
1 files changed, 0 insertions(+), 18 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 7f093c6..07d0b84 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -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();
More information about the wine-cvs
mailing list