From 07c761a6a14a6fda05ed19bdaac399d1f117aca5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20D=C3=B6singer?= Date: Tue, 14 Jun 2011 20:21:08 +0200 Subject: [PATCH] ddraw: Implement IDirect3D7::EvictManagedTextures. --- dlls/ddraw/ddraw.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 2dbad98b896..0474d19f8ed 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -5126,12 +5126,16 @@ static HRESULT WINAPI d3d3_EnumZBufferFormats(IDirect3D3 *iface, REFCLSID device *****************************************************************************/ static HRESULT WINAPI d3d7_EvictManagedTextures(IDirect3D7 *iface) { - FIXME("iface %p stub!\n", iface); + IDirectDrawImpl *This = impl_from_IDirect3D7(iface); + HRESULT hr; + TRACE("iface %p!\n", iface); - /* TODO: Just enumerate resources using IWineD3DDevice_EnumResources(), - * then unload surfaces / textures. */ + EnterCriticalSection(&ddraw_cs); + if (!This->d3d_initialized) hr = D3D_OK; + else hr = wined3d_device_evict_managed_resources(This->wined3d_device); + LeaveCriticalSection(&ddraw_cs); - return D3D_OK; + return hr; } static HRESULT WINAPI d3d3_EvictManagedTextures(IDirect3D3 *iface) -- 2.11.4.GIT