Module: wine
Branch: master
Commit: ada8ad76b97e7bd2d85d6b943216bc7bc2f58d1c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ada8ad76b97e7bd2d85d6b943…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Wed Dec 7 22:08:57 2011 +0100
wined3d: Avoid clearing the current wined3d context in WineD3D_CreateFakeGLContext().
There should be no need to clear the thread's current wined3d context as long
as we properly restore the corresponding GL stuff. This avoids hitting the
context restore code in context_enter() when we have e.g. two d3d9 devices,
one of which is inactive, because now we can see that the GL context that's
active belongs to another wined3d context, and we don't need to bother
saving and restoring it.
---
dlls/wined3d/directx.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index ece3b16..c2d5c2f 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -341,11 +341,6 @@ static BOOL WineD3D_CreateFakeGLContext(struct wined3d_fake_gl_ctx *ctx)
}
/* Make it the current GL context. */
- if (!context_set_current(NULL))
- {
- ERR_(d3d_caps)("Failed to clear current D3D context.\n");
- }
-
if (!pwglMakeCurrent(ctx->dc, ctx->gl_ctx))
{
ERR_(d3d_caps)("Failed to make fake GL context current.\n");
Module: wine
Branch: master
Commit: 2d1a941b7dc76d754b15c3f6807fb5e371e367a5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2d1a941b7dc76d754b15c3f68…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Wed Dec 7 22:08:56 2011 +0100
wined3d: Properly check if a surface has a DIB section in gdi_surface_map().
---
dlls/wined3d/surface.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index e7ae65b..b7a120e 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1983,7 +1983,7 @@ static void gdi_surface_map(struct wined3d_surface *surface, const RECT *rect, D
TRACE("surface %p, rect %s, flags %#x.\n",
surface, wine_dbgstr_rect(rect), flags);
- if (!surface->resource.allocatedMemory)
+ if (!(surface->flags & SFLAG_DIBSECTION))
{
/* This happens on gdi surfaces if the application set a user pointer
* and resets it. Recreate the DIB section. */