diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index d8cc87680c4..6be40c767a9 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1073,7 +1073,10 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar * but enable it for the first context we create, and reenable it on the old context */ if(oldDrawable && oldCtx) { - pwglMakeCurrent(oldDrawable, oldCtx); + if (!pwglMakeCurrent(oldDrawable, oldCtx)) + { + ERR("Failed to make previous GL context %p current.\n", oldCtx); + } } else { last_device = This; } @@ -1201,7 +1204,11 @@ void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context) { } /* Cleanup the GL context */ - pwglMakeCurrent(NULL, NULL); + if (!pwglMakeCurrent(NULL, NULL)) + { + ERR("Failed to disable GL context.\n"); + } + if(context->isPBuffer) { GL_EXTCALL(wglReleasePbufferDCARB(context->pbuffer, context->hdc)); GL_EXTCALL(wglDestroyPbufferARB(context->pbuffer)); diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 26782851b10..1512a3158ed 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -230,7 +230,10 @@ static void WineD3D_ReleaseFakeGLContext(void) { if (0 == (--wined3d_fake_gl_context_ref) ) { if(!wined3d_fake_gl_context_foreign && glCtx) { TRACE_(d3d_caps)("destroying fake GL context\n"); - pwglMakeCurrent(NULL, NULL); + if (!pwglMakeCurrent(NULL, NULL)) + { + ERR("Failed to disable fake GL context.\n"); + } pwglDeleteContext(glCtx); } if(wined3d_fake_gl_context_hdc) @@ -301,7 +304,7 @@ static BOOL WineD3D_CreateFakeGLContext(void) { /* Make it the current GL context */ if (!pwglMakeCurrent(wined3d_fake_gl_context_hdc, glCtx)) { - WARN_(d3d_caps)("Error setting default context as current for capabilities initialization\n"); + ERR_(d3d_caps)("Failed to make fake GL context current.\n"); goto fail; } }