From 7e57924d322e6c15bbfc8c505c2a0817d9e5ad2e Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 1 Feb 2016 18:42:10 +0100 Subject: [PATCH] ddraw: Use wined3d_texture_release_dc() in ddraw_surface7_ReleaseDC(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/ddraw/surface.c | 2 +- dlls/wined3d/surface.c | 2 +- dlls/wined3d/wined3d.spec | 1 - dlls/wined3d/wined3d_private.h | 1 + include/wine/wined3d.h | 1 - 5 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 7b4f1abd8c1..25aa9b8e5ca 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -2211,7 +2211,7 @@ static HRESULT WINAPI ddraw_surface7_ReleaseDC(IDirectDrawSurface7 *iface, HDC h TRACE("iface %p, dc %p.\n", iface, hdc); wined3d_mutex_lock(); - hr = wined3d_surface_releasedc(surface->wined3d_surface, hdc); + hr = wined3d_texture_release_dc(surface->wined3d_texture, surface->sub_resource_idx, hdc); if (SUCCEEDED(hr) && (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)) hr = ddraw_surface_update_frontbuffer(surface, NULL, FALSE); wined3d_mutex_unlock(); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 6fad0524c83..57ab90c5b8e 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2629,7 +2629,7 @@ HRESULT wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) return WINED3D_OK; } -HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc) +HRESULT wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc) { TRACE("surface %p, dc %p.\n", surface, dc); diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 22f8f563f78..2698d17692a 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -227,7 +227,6 @@ @ cdecl wined3d_surface_get_pitch(ptr) @ cdecl wined3d_surface_get_resource(ptr) @ cdecl wined3d_surface_map(ptr ptr ptr long) -@ cdecl wined3d_surface_releasedc(ptr ptr) @ cdecl wined3d_surface_set_overlay_position(ptr long long) @ cdecl wined3d_surface_unmap(ptr) @ cdecl wined3d_surface_update_overlay(ptr ptr ptr ptr long ptr) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 81e808eac23..5474c7ff6f7 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2521,6 +2521,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN; void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; +HRESULT wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc) DECLSPEC_HIDDEN; void surface_set_compatible_renderbuffer(struct wined3d_surface *surface, const struct wined3d_surface *rt) DECLSPEC_HIDDEN; void surface_set_texture_target(struct wined3d_surface *surface, GLenum target, GLint level) DECLSPEC_HIDDEN; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index e589037a2dd..0b134cd3a56 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2478,7 +2478,6 @@ DWORD __cdecl wined3d_surface_get_pitch(const struct wined3d_surface *surface); struct wined3d_resource * __cdecl wined3d_surface_get_resource(struct wined3d_surface *surface); HRESULT __cdecl wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags); -HRESULT __cdecl wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc); HRESULT __cdecl wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y); HRESULT __cdecl wined3d_surface_unmap(struct wined3d_surface *surface); HRESULT __cdecl wined3d_surface_update_overlay(struct wined3d_surface *surface, const RECT *src_rect,