wined3d: Cleanup IWineD3DBaseSwapChainImpl_QueryInterface().
This commit is contained in:
parent
3f77683174
commit
d9fefdb917
|
@ -27,22 +27,22 @@
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||||
|
|
||||||
/* IDirect3DSwapChain IUnknown parts follow: */
|
/* IDirect3DSwapChain IUnknown parts follow: */
|
||||||
HRESULT WINAPI IWineD3DBaseSwapChainImpl_QueryInterface(IWineD3DSwapChain *iface, REFIID riid, LPVOID *ppobj)
|
HRESULT WINAPI IWineD3DBaseSwapChainImpl_QueryInterface(IWineD3DSwapChain *iface, REFIID riid, void **object)
|
||||||
{
|
{
|
||||||
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
|
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
|
||||||
TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppobj);
|
|
||||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
if (IsEqualGUID(riid, &IID_IWineD3DSwapChain)
|
||||||
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|
||||||
|| IsEqualGUID(riid, &IID_IWineD3DSwapChain)){
|
|| IsEqualGUID(riid, &IID_IUnknown))
|
||||||
IWineD3DSwapChain_AddRef(iface);
|
{
|
||||||
if(ppobj == NULL){
|
IUnknown_AddRef(iface);
|
||||||
ERR("Query interface called but now data allocated\n");
|
*object = iface;
|
||||||
return E_NOINTERFACE;
|
return S_OK;
|
||||||
}
|
}
|
||||||
*ppobj = This;
|
|
||||||
return WINED3D_OK;
|
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
|
||||||
}
|
|
||||||
*ppobj = NULL;
|
*object = NULL;
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue