Commit 59116f83 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Use wined3d_texture_preload() in d3d_device7_PreLoad().

This is safe because D3D is always initialized in D3D device methods. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 8ae45801
......@@ -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;
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment