Henri Verbeet : ddraw: Just read the actual reference counts in DestroyCallback().

Alexandre Julliard julliard at winehq.org
Wed Dec 7 13:57:12 CST 2011


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Dec  6 22:57:46 2011 +0100

ddraw: Just read the actual reference counts in DestroyCallback().

---

 dlls/ddraw/main.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c
index c9d5139..9d5bb53 100644
--- a/dlls/ddraw/main.c
+++ b/dlls/ddraw/main.c
@@ -764,16 +764,12 @@ DestroyCallback(IDirectDrawSurface7 *surf,
     ULONG ref7, ref4, ref3, ref2, ref1, gamma_count, iface_count;
 
     ref7 = IDirectDrawSurface7_Release(surf);  /* For the EnumSurfaces */
-    IDirectDrawSurface4_AddRef(&Impl->IDirectDrawSurface4_iface);
-    ref4 = IDirectDrawSurface4_Release(&Impl->IDirectDrawSurface4_iface);
-    IDirectDrawSurface3_AddRef(&Impl->IDirectDrawSurface3_iface);
-    ref3 = IDirectDrawSurface3_Release(&Impl->IDirectDrawSurface3_iface);
-    IDirectDrawSurface2_AddRef(&Impl->IDirectDrawSurface2_iface);
-    ref2 = IDirectDrawSurface2_Release(&Impl->IDirectDrawSurface2_iface);
-    IDirectDrawSurface_AddRef(&Impl->IDirectDrawSurface_iface);
-    ref1 = IDirectDrawSurface_Release(&Impl->IDirectDrawSurface_iface);
-    IDirectDrawGammaControl_AddRef(&Impl->IDirectDrawGammaControl_iface);
-    gamma_count = IDirectDrawGammaControl_Release(&Impl->IDirectDrawGammaControl_iface);
+    ref4 = Impl->ref4;
+    ref3 = Impl->ref3;
+    ref2 = Impl->ref2;
+    ref1 = Impl->ref1;
+    gamma_count = Impl->gamma_count;
+
     WARN("Surface %p has an reference counts of 7: %u 4: %u 3: %u 2: %u 1: %u gamma: %u\n",
             Impl, ref7, ref4, ref3, ref2, ref1, gamma_count);
 




More information about the wine-cvs mailing list