Henri Verbeet : wined3d: IWineD3DClipperImpl implements IWineD3DBase.

Alexandre Julliard julliard at winehq.org
Mon Dec 21 09:39:51 CST 2009


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Sun Dec 20 20:41:38 2009 +0100

wined3d: IWineD3DClipperImpl implements IWineD3DBase.

Unify the QueryInterface implementation a bit with the rest of wined3d while
we're at it.

---

 dlls/wined3d/clipper.c |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/dlls/wined3d/clipper.c b/dlls/wined3d/clipper.c
index 2d3184f..febd92b 100644
--- a/dlls/wined3d/clipper.c
+++ b/dlls/wined3d/clipper.c
@@ -28,22 +28,23 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
 
-static HRESULT WINAPI IWineD3DClipperImpl_QueryInterface(IWineD3DClipper *iface, REFIID riid, void **Obj)
+static HRESULT WINAPI IWineD3DClipperImpl_QueryInterface(IWineD3DClipper *iface, REFIID riid, void **object)
 {
-    IWineD3DClipperImpl *This = (IWineD3DClipperImpl *)iface;
+    TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
 
-    TRACE("(%p)->(%p,%p)\n", This, riid, Obj);
-    if (IsEqualGUID(&IID_IUnknown, riid)
-        || IsEqualGUID(&IID_IWineD3DClipper, riid))
+    if (IsEqualGUID(riid, &IID_IWineD3DClipper)
+            || IsEqualGUID(riid, &IID_IWineD3DBase)
+            || IsEqualGUID(riid, &IID_IUnknown))
     {
-        *Obj = iface;
-        IWineD3DClipper_AddRef(iface);
+        IUnknown_AddRef(iface);
+        *object = iface;
         return S_OK;
     }
-    else
-    {
-        return E_NOINTERFACE;
-    }
+
+    WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
+
+    *object = NULL;
+    return E_NOINTERFACE;
 }
 
 static ULONG WINAPI IWineD3DClipperImpl_AddRef(IWineD3DClipper *iface )




More information about the wine-cvs mailing list