Workaround patch from http://bugs.winehq.org/show_bug.cgi?id=17193 diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 478c216..52860f9 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -793,9 +793,6 @@ static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { else gl_info->pfn = NULL; \ } GL_EXT_FUNCS_GEN; -#undef USE_GL_FUNC - -#define USE_GL_FUNC(type, pfn, ext, replace) gl_info->pfn = (type) pwglGetProcAddress(#pfn); WGL_EXT_FUNCS_GEN; #undef USE_GL_FUNC @@ -1399,12 +1396,14 @@ static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { /* Make sure there's an active HDC else the WGL extensions will fail */ hdc = pwglGetCurrentDC(); if (hdc) { - WGL_Extensions = GL_EXTCALL(wglGetExtensionsStringARB(hdc)); - TRACE_(d3d_caps)("WGL_Extensions reported:\n"); - - if (NULL == WGL_Extensions) { - ERR(" WGL_Extensions returns NULL\n"); + if (! GL_EXTCALL(wglGetExtensionsStringARB)) { + TRACE_(d3d_caps)("wglGetExtensionsStringARB is unavailable\n"); } else { + WGL_Extensions = GL_EXTCALL(wglGetExtensionsStringARB(hdc)); + if (NULL == WGL_Extensions) + ERR(" WGL_Extensions returns NULL\n"); + + TRACE_(d3d_caps)("WGL_Extensions reported:\n"); while (*WGL_Extensions != 0x00) { const char *Start; char ThisExtn[256]; @@ -4287,7 +4286,12 @@ BOOL InitAdapters(void) { strcpyW(Adapters[0].DeviceName, DisplayDevice.DeviceName); attribute = WGL_NUMBER_PIXEL_FORMATS_ARB; - GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, &attribute, &Adapters[0].nCfgs)); + if (GL_EXTCALL(wglGetPixelFormatAttribivARB)) + GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, &attribute, &Adapters[0].nCfgs)); + else { + TRACE("wglGetPixelFormatAttribivARB is unavailable\n"); + Adapters[0].nCfgs = 0; + } Adapters[0].cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Adapters[0].nCfgs *sizeof(WineD3D_PixelFormat)); cfgs = Adapters[0].cfgs;