Module: wine Branch: master Commit: 83a147d98a9c944dae63de251efda9744a539f5c URL: http://source.winehq.org/git/wine.git/?a=commit;h=83a147d98a9c944dae63de251e...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Feb 1 18:42:09 2016 +0100
ddraw: Use wined3d_texture_get_dc() in ddraw_surface7_GetDC().
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@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 bc304ca..7b4f1ab 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -2123,7 +2123,7 @@ static HRESULT WINAPI ddraw_surface7_GetDC(IDirectDrawSurface7 *iface, HDC *hdc) if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) hr = ddraw_surface_update_frontbuffer(surface, NULL, TRUE); if (SUCCEEDED(hr)) - hr = wined3d_surface_getdc(surface->wined3d_surface, hdc); + hr = wined3d_texture_get_dc(surface->wined3d_texture, surface->sub_resource_idx, hdc);
if (SUCCEEDED(hr) && format_is_paletteindexed(&surface->surface_desc.u4.ddpfPixelFormat)) { diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 245cf27..6fad052 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2580,7 +2580,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, return WINED3D_OK; }
-HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) +HRESULT wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) { HRESULT hr; struct wined3d_device *device = surface->resource.device; diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 65220c6..22f8f56 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -226,7 +226,6 @@ @ cdecl wined3d_surface_get_parent(ptr) @ cdecl wined3d_surface_get_pitch(ptr) @ cdecl wined3d_surface_get_resource(ptr) -@ cdecl wined3d_surface_getdc(ptr ptr) @ cdecl wined3d_surface_map(ptr ptr ptr long) @ cdecl wined3d_surface_releasedc(ptr ptr) @ cdecl wined3d_surface_set_overlay_position(ptr long long) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 1b25704..81e808e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2507,6 +2507,7 @@ void surface_set_dirty(struct wined3d_surface *surface) DECLSPEC_HIDDEN; HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const struct wined3d_color *color) DECLSPEC_HIDDEN; GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN; +HRESULT wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) DECLSPEC_HIDDEN; void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context, unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN; void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 24e4063..e589037 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2476,7 +2476,6 @@ HRESULT __cdecl wined3d_surface_get_overlay_position(const struct wined3d_surfac 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_getdc(struct wined3d_surface *surface, HDC *dc); 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);