Henri Verbeet : ddraw: Use wined3d_resource_unmap() in ddraw_surface7_Unlock().
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Feb 3 10:23:52 CST 2016
Module: wine
Branch: master
Commit: 44f2589e7c239243b587e2d7ff92f4cdde61c3b6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=44f2589e7c239243b587e2d7ff92f4cdde61c3b6
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Feb 2 19:23:30 2016 +0100
ddraw: Use wined3d_resource_unmap() in ddraw_surface7_Unlock().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 edb9485..71b424d 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -1159,7 +1159,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Unlock(IDirectDrawSurface
TRACE("iface %p, rect %s.\n", iface, wine_dbgstr_rect(pRect));
wined3d_mutex_lock();
- hr = wined3d_surface_unmap(surface->wined3d_surface);
+ hr = wined3d_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx);
if (SUCCEEDED(hr) && surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
hr = ddraw_surface_update_frontbuffer(surface, &surface->ddraw->primary_lock, FALSE);
wined3d_mutex_unlock();
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 657ef12..a98f767 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2418,7 +2418,7 @@ do { \
return WINED3D_OK;
}
-HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
+HRESULT wined3d_surface_unmap(struct wined3d_surface *surface)
{
TRACE("surface %p.\n", surface);
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 6ff3151..6f930ef 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_set_overlay_position(ptr long long)
-@ cdecl wined3d_surface_unmap(ptr)
@ cdecl wined3d_surface_update_overlay(ptr ptr ptr ptr long ptr)
@ cdecl wined3d_surface_update_overlay_z_order(ptr long ptr)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 94c7005..965b012 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2559,6 +2559,7 @@ 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;
void surface_translate_drawable_coords(const struct wined3d_surface *surface, HWND window, RECT *rect) DECLSPEC_HIDDEN;
+HRESULT wined3d_surface_unmap(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) DECLSPEC_HIDDEN;
HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point,
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 04b022c..f29f4ff 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2480,7 +2480,6 @@ void * __cdecl wined3d_surface_get_parent(const struct wined3d_surface *surface)
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_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,
struct wined3d_surface *dst_surface, const RECT *dst_rect, DWORD flags, const WINEDDOVERLAYFX *fx);
HRESULT __cdecl wined3d_surface_update_overlay_z_order(struct wined3d_surface *surface,
More information about the wine-cvs
mailing list