[PATCH 1/6] wined3d: Support getdc with user memory.
Stefan Dösinger
stefan at codeweavers.com
Wed Dec 11 05:22:16 CST 2013
---
dlls/wined3d/surface.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 5b28e9b..0d6b72b 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3297,12 +3297,6 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
TRACE("surface %p, dc %p.\n", surface, dc);
- if (surface->flags & SFLAG_USERPTR)
- {
- ERR("Not supported on surfaces with application-provided memory.\n");
- return WINEDDERR_NODC;
- }
-
/* Give more detailed info for ddraw. */
if (surface->flags & SFLAG_DCINUSE)
return WINEDDERR_DCALREADYCREATED;
@@ -3323,8 +3317,8 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc)
if (FAILED(hr))
return WINED3DERR_INVALIDCALL;
- /* Use the DIB section from now on if we are not using a PBO. */
- if (!(surface->flags & (SFLAG_PBO | SFLAG_PIN_SYSMEM)))
+ /* Use the DIB section from now on if we are not using a PBO or user memory. */
+ if (!(surface->flags & (SFLAG_PBO | SFLAG_PIN_SYSMEM | SFLAG_USERPTR)))
{
wined3d_resource_free_sysmem(&surface->resource);
surface->resource.allocatedMemory = surface->dib.bitmap_data;
--
1.8.3.2
More information about the wine-patches
mailing list