From 59116f833ea29839b186617b625bb3aa01927944 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Fri, 29 Jan 2016 18:48:57 +0100 Subject: [PATCH] ddraw: Use wined3d_texture_preload() in d3d_device7_PreLoad(). This is safe because D3D is always initialized in D3D device methods. Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/ddraw/device.c | 2 +- dlls/wined3d/surface.c | 13 ------------- dlls/wined3d/wined3d.spec | 1 - include/wine/wined3d.h | 1 - 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 6c1bd49a8a2..c46065895a4 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5631,7 +5631,7 @@ static HRESULT d3d_device7_PreLoad(IDirect3DDevice7 *iface, IDirectDrawSurface7 return DDERR_INVALIDPARAMS; wined3d_mutex_lock(); - wined3d_surface_preload(surface->wined3d_surface); + wined3d_texture_preload(surface->wined3d_texture); wined3d_mutex_unlock(); return D3D_OK; diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 863eca25abc..245cf278026 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1867,19 +1867,6 @@ static inline unsigned short float_32_to_16(const float *in) return ret; } -void CDECL wined3d_surface_preload(struct wined3d_surface *surface) -{ - TRACE("surface %p.\n", surface); - - if (!surface->resource.device->d3d_initialized) - { - ERR("D3D not initialized.\n"); - return; - } - - wined3d_texture_preload(surface->container); -} - void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface) { TRACE("surface %p.\n", surface); diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 49041bb2029..65220c6ad61 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -228,7 +228,6 @@ @ cdecl wined3d_surface_get_resource(ptr) @ cdecl wined3d_surface_getdc(ptr ptr) @ cdecl wined3d_surface_map(ptr ptr ptr long) -@ cdecl wined3d_surface_preload(ptr) @ cdecl wined3d_surface_releasedc(ptr ptr) @ cdecl wined3d_surface_set_overlay_position(ptr long long) @ cdecl wined3d_surface_unmap(ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 893fd67cbc6..24e4063369a 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2479,7 +2479,6 @@ struct wined3d_resource * __cdecl wined3d_surface_get_resource(struct wined3d_su 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); -void __cdecl wined3d_surface_preload(struct wined3d_surface *surface); 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);