wined3d: Get rid of wined3d_fake_gl_context_cs.
This commit is contained in:
parent
4cacf2e08f
commit
23ce9d72b8
|
@ -204,20 +204,8 @@ struct wined3d_fake_gl_ctx
|
||||||
HGLRC gl_ctx;
|
HGLRC gl_ctx;
|
||||||
};
|
};
|
||||||
|
|
||||||
static CRITICAL_SECTION wined3d_fake_gl_context_cs;
|
|
||||||
static CRITICAL_SECTION_DEBUG wined3d_fake_gl_context_cs_debug =
|
|
||||||
{
|
|
||||||
0, 0, &wined3d_fake_gl_context_cs,
|
|
||||||
{ &wined3d_fake_gl_context_cs_debug.ProcessLocksList,
|
|
||||||
&wined3d_fake_gl_context_cs_debug.ProcessLocksList },
|
|
||||||
0, 0, { (DWORD_PTR)(__FILE__ ": wined3d_fake_gl_context_cs") }
|
|
||||||
};
|
|
||||||
static CRITICAL_SECTION wined3d_fake_gl_context_cs = { &wined3d_fake_gl_context_cs_debug, -1, 0, 0, 0, 0 };
|
|
||||||
|
|
||||||
static void WineD3D_ReleaseFakeGLContext(struct wined3d_fake_gl_ctx *ctx)
|
static void WineD3D_ReleaseFakeGLContext(struct wined3d_fake_gl_ctx *ctx)
|
||||||
{
|
{
|
||||||
EnterCriticalSection(&wined3d_fake_gl_context_cs);
|
|
||||||
|
|
||||||
TRACE_(d3d_caps)("Destroying fake GL context.\n");
|
TRACE_(d3d_caps)("Destroying fake GL context.\n");
|
||||||
|
|
||||||
if (!pwglMakeCurrent(NULL, NULL))
|
if (!pwglMakeCurrent(NULL, NULL))
|
||||||
|
@ -228,8 +216,6 @@ static void WineD3D_ReleaseFakeGLContext(struct wined3d_fake_gl_ctx *ctx)
|
||||||
pwglDeleteContext(ctx->gl_ctx);
|
pwglDeleteContext(ctx->gl_ctx);
|
||||||
ReleaseDC(ctx->wnd, ctx->dc);
|
ReleaseDC(ctx->wnd, ctx->dc);
|
||||||
DestroyWindow(ctx->wnd);
|
DestroyWindow(ctx->wnd);
|
||||||
|
|
||||||
LeaveCriticalSection(&wined3d_fake_gl_context_cs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL WineD3D_CreateFakeGLContext(struct wined3d_fake_gl_ctx *ctx)
|
static BOOL WineD3D_CreateFakeGLContext(struct wined3d_fake_gl_ctx *ctx)
|
||||||
|
@ -237,8 +223,6 @@ static BOOL WineD3D_CreateFakeGLContext(struct wined3d_fake_gl_ctx *ctx)
|
||||||
PIXELFORMATDESCRIPTOR pfd;
|
PIXELFORMATDESCRIPTOR pfd;
|
||||||
int iPixelFormat;
|
int iPixelFormat;
|
||||||
|
|
||||||
EnterCriticalSection(&wined3d_fake_gl_context_cs);
|
|
||||||
|
|
||||||
TRACE("getting context...\n");
|
TRACE("getting context...\n");
|
||||||
|
|
||||||
/* We need a fake window as a hdc retrieved using GetDC(0) can't be used for much GL purposes. */
|
/* We need a fake window as a hdc retrieved using GetDC(0) can't be used for much GL purposes. */
|
||||||
|
@ -292,7 +276,6 @@ static BOOL WineD3D_CreateFakeGLContext(struct wined3d_fake_gl_ctx *ctx)
|
||||||
}
|
}
|
||||||
context_set_last_device(NULL);
|
context_set_last_device(NULL);
|
||||||
|
|
||||||
LeaveCriticalSection(&wined3d_fake_gl_context_cs);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
@ -303,7 +286,6 @@ fail:
|
||||||
if (ctx->wnd) DestroyWindow(ctx->wnd);
|
if (ctx->wnd) DestroyWindow(ctx->wnd);
|
||||||
ctx->wnd = NULL;
|
ctx->wnd = NULL;
|
||||||
|
|
||||||
LeaveCriticalSection(&wined3d_fake_gl_context_cs);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue