d3drm: Fix QueryInterface for IDirect3DRMTexture*.

Signed-off-by: Aaryaman Vasishta <jem456.vasishta@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Aaryaman Vasishta 2016-01-20 20:36:14 +05:30 committed by Alexandre Julliard
parent 924cad5f3b
commit 47913f1c1c
1 changed files with 11 additions and 6 deletions

View File

@ -679,21 +679,26 @@ static HRESULT WINAPI d3drm_texture3_QueryInterface(IDirect3DRMTexture3 *iface,
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out); TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
if (IsEqualGUID(riid, &IID_IDirect3DRMTexture2) if (IsEqualGUID(riid, &IID_IDirect3DRMTexture3)
|| IsEqualGUID(riid, &IID_IDirect3DRMTexture) || IsEqualGUID(riid, &IID_IDirect3DRMVisual)
|| IsEqualGUID(riid, &IID_IDirect3DRMObject)
|| IsEqualGUID(riid, &IID_IUnknown)) || IsEqualGUID(riid, &IID_IUnknown))
{
*out = &texture->IDirect3DRMTexture3_iface;
}
else if (IsEqualGUID(riid, &IID_IDirect3DRMTexture2))
{ {
*out = &texture->IDirect3DRMTexture2_iface; *out = &texture->IDirect3DRMTexture2_iface;
} }
else if (IsEqualGUID(riid, &IID_IDirect3DRMTexture3)) else if (IsEqualGUID(riid, &IID_IDirect3DRMTexture))
{ {
*out = &texture->IDirect3DRMTexture3_iface; *out = &texture->IDirect3DRMTexture_iface;
} }
else else
{ {
*out = NULL; *out = NULL;
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); WARN("%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(riid));
return E_NOINTERFACE; return CLASS_E_CLASSNOTAVAILABLE;
} }
IUnknown_AddRef((IUnknown *)*out); IUnknown_AddRef((IUnknown *)*out);