[PATCH] 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.
Roderick Colenbrander
thunderbird2k at gmx.net
Sat Sep 29 09:38:11 CDT 2007
---
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;
}
--
1.5.1.3
--========GMX259281191079274592236--
More information about the wine-patches
mailing list