Roderick Colenbrander : wined3d: CreateFakeGLContxt/ ReleaseFakeGLContext doesn't need ENTER_GL/ LEAVE_GL and they are making GDI calls.

Alexandre Julliard julliard at winehq.org
Mon Oct 1 07:54:59 CDT 2007


Module: wine
Branch: master
Commit: 46f33f4f38b6106ada3d7ed65a329e2b55c9df4b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=46f33f4f38b6106ada3d7ed65a329e2b55c9df4b

Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date:   Sat Sep 29 16:38:11 2007 +0200

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 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index eef40b8..1f9f1a1 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;
 }




More information about the wine-cvs mailing list