From 47913f1c1c58bd62756c54910865c7cedcfc8501 Mon Sep 17 00:00:00 2001 From: Aaryaman Vasishta Date: Wed, 20 Jan 2016 20:36:14 +0530 Subject: [PATCH] d3drm: Fix QueryInterface for IDirect3DRMTexture*. Signed-off-by: Aaryaman Vasishta Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3drm/texture.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/dlls/d3drm/texture.c b/dlls/d3drm/texture.c index 46d968a7ed2..080c6f83739 100644 --- a/dlls/d3drm/texture.c +++ b/dlls/d3drm/texture.c @@ -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); - if (IsEqualGUID(riid, &IID_IDirect3DRMTexture2) - || IsEqualGUID(riid, &IID_IDirect3DRMTexture) + if (IsEqualGUID(riid, &IID_IDirect3DRMTexture3) + || IsEqualGUID(riid, &IID_IDirect3DRMVisual) + || IsEqualGUID(riid, &IID_IDirect3DRMObject) || IsEqualGUID(riid, &IID_IUnknown)) + { + *out = &texture->IDirect3DRMTexture3_iface; + } + else if (IsEqualGUID(riid, &IID_IDirect3DRMTexture2)) { *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 { *out = NULL; - WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); - return E_NOINTERFACE; + WARN("%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(riid)); + return CLASS_E_CLASSNOTAVAILABLE; } IUnknown_AddRef((IUnknown *)*out);