From 46f33f4f38b6106ada3d7ed65a329e2b55c9df4b Mon Sep 17 00:00:00 2001 From: Roderick Colenbrander Date: Sat, 29 Sep 2007 16:38:11 +0200 Subject: [PATCH] wined3d: CreateFakeGLContxt/ReleaseFakeGLContext doesn't need ENTER_GL/LEAVE_GL and they are making GDI calls. The removal of ENTER_GL from the fake context code, requires the addition of ENTER_GL/LEAVE_GL to FillGLCaps which was protected by the fake context code before. --- dlls/wined3d/directx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index eef40b87051..1f9f1a1e360 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -192,13 +192,11 @@ static void WineD3D_ReleaseFakeGLContext(void) { assert(wined3d_fake_gl_context_ref >= 0); LeaveCriticalSection(&wined3d_fake_gl_context_cs); - LEAVE_GL(); } static BOOL WineD3D_CreateFakeGLContext(void) { HGLRC glCtx = NULL; - ENTER_GL(); EnterCriticalSection(&wined3d_fake_gl_context_cs); TRACE("getting context...\n"); @@ -273,7 +271,6 @@ static BOOL WineD3D_CreateFakeGLContext(void) { wined3d_fake_gl_context_hwnd = NULL; if(glCtx) pwglDeleteContext(glCtx); LeaveCriticalSection(&wined3d_fake_gl_context_cs); - LEAVE_GL(); return FALSE; } @@ -419,6 +416,8 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { TRACE_(d3d_caps)("(%p)\n", gl_info); + ENTER_GL(); + gl_string = (const char *) glGetString(GL_RENDERER); if (NULL == gl_string) gl_string = "None"; @@ -1130,6 +1129,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { } } } + LEAVE_GL(); return return_value; }