WINED3D: Return the result of QueryInterface in GetContainer
H. Verbeet
hverbeet at gmail.com
Tue Jun 6 16:42:33 CDT 2006
Changing the return value to WINED3DERR_INVALIDCALL when
QueryInterface fails is unnecessary and loses information. Returning
the result of QueryInterface is more consistent with d3d8 and d3d9 as
well.
Changelog:
- Return the result of QueryInterface in GetContainer.
-------------- next part --------------
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index e270701..4651010 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -236,10 +236,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetCo
}
TRACE("Relaying to QueryInterface\n");
- if (IUnknown_QueryInterface(container, riid, ppContainer) != S_OK)
- return WINED3DERR_INVALIDCALL;
-
- return WINED3D_OK;
+ return IUnknown_QueryInterface(container, riid, ppContainer);
}
HRESULT WINAPI IWineD3DSurfaceImpl_GetDesc(IWineD3DSurface *iface, WINED3DSURFACE_DESC *pDesc) {
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index a8a9c1e..3c7c66b 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -142,10 +142,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_GetCon
}
TRACE("Relaying to QueryInterface\n");
- if (IUnknown_QueryInterface(This->container, riid, ppContainer) != S_OK)
- return WINED3DERR_INVALIDCALL;
-
- return WINED3D_OK;
+ return IUnknown_QueryInterface(This->container, riid, ppContainer);
}
HRESULT WINAPI IWineD3DVolumeImpl_GetDesc(IWineD3DVolume *iface, WINED3DVOLUME_DESC* pDesc) {
More information about the wine-patches
mailing list