Henri Verbeet : d3d9: Use the surface implementation pointer in reset_enum_callback().
Module: wine Branch: master Commit: 138edd31e596a14ba69f8c53b05cada71ea0143b URL: http://source.winehq.org/git/wine.git/?a=commit;h=138edd31e596a14ba69f8c53b0... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Apr 24 20:54:12 2012 +0200 d3d9: Use the surface implementation pointer in reset_enum_callback(). --- dlls/d3d9/device.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 7fd300fb..ddfaae6 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -507,7 +507,7 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource) wined3d_resource_get_desc(resource, &desc); if (desc.pool == WINED3D_POOL_DEFAULT) { - IDirect3DSurface9 *surface; + IDirect3DSurface9Impl *surface; if (desc.resource_type != WINED3D_RTYPE_SURFACE) { @@ -516,9 +516,7 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource) } surface = wined3d_resource_get_parent(resource); - - IDirect3DSurface9_AddRef(surface); - if (IDirect3DSurface9_Release(surface)) + if (surface->ref) { WARN("Surface %p (resource %p) in pool D3DPOOL_DEFAULT blocks the Reset call.\n", surface, resource); return D3DERR_INVALIDCALL;
participants (1)
-
Alexandre Julliard