Henri Verbeet : d3d8: Use the surface implementation pointer in reset_enum_callback().

Alexandre Julliard julliard at winehq.org
Fri Apr 20 12:49:27 CDT 2012


Module: wine
Branch: master
Commit: 5cc7d0645b71cb6cb1656ad8df70946674a50b78
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5cc7d0645b71cb6cb1656ad8df70946674a50b78

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Apr 19 20:44:57 2012 +0200

d3d8: Use the surface implementation pointer in reset_enum_callback().

---

 dlls/d3d8/device.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index ea2ce17..36296d2 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -535,7 +535,7 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource)
     wined3d_resource_get_desc(resource, &desc);
     if (desc.pool == WINED3D_POOL_DEFAULT)
     {
-        IDirect3DSurface8 *surface;
+        IDirect3DSurface8Impl *surface;
 
         if (desc.resource_type != WINED3D_RTYPE_SURFACE)
         {
@@ -544,9 +544,7 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource)
         }
 
         surface = wined3d_resource_get_parent(resource);
-
-        IDirect3DSurface8_AddRef(surface);
-        if (IDirect3DSurface8_Release(surface))
+        if (surface->ref)
         {
             WARN("Surface %p (resource %p) in pool D3DPOOL_DEFAULT blocks the Reset call.\n", surface, resource);
             return D3DERR_DEVICELOST;




More information about the wine-cvs mailing list