Commit c75c8e7f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3drm: Fix IDirect3DRMMesh::QueryInterface to support IDirect3DRMObject and IDirect3DRMVisual.

parent d3e47919
......@@ -2322,6 +2322,8 @@ static HRESULT WINAPI d3drm_mesh_QueryInterface(IDirect3DRMMesh *iface, REFIID r
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
if (IsEqualGUID(riid, &IID_IDirect3DRMMesh)
|| IsEqualGUID(riid, &IID_IDirect3DRMVisual)
|| IsEqualGUID(riid, &IID_IDirect3DRMObject)
|| IsEqualGUID(riid, &IID_IUnknown))
{
IDirect3DRMMesh_AddRef(iface);
......
......@@ -615,6 +615,7 @@ static void test_Mesh(void)
IDirect3DRMMesh *mesh;
DWORD size;
CHAR cname[64] = {0};
IUnknown *unk;
hr = Direct3DRMCreate(&d3drm);
ok(hr == D3DRM_OK, "Cannot get IDirect3DRM interface (hr = %x)\n", hr);
......@@ -635,6 +636,14 @@ static void test_Mesh(void)
ok(size == sizeof("Mesh"), "wrong size: %u\n", size);
ok(!strcmp(cname, "Mesh"), "Expected cname to be \"Mesh\", but got \"%s\"\n", cname);
hr = IDirect3DRMMesh_QueryInterface(mesh, &IID_IDirect3DRMObject, (void **)&unk);
ok(SUCCEEDED(hr), "Failed to get IDirect3DRMObject, %#x.\n", hr);
IUnknown_Release(unk);
hr = IDirect3DRMMesh_QueryInterface(mesh, &IID_IDirect3DRMVisual, (void **)&unk);
ok(SUCCEEDED(hr), "Failed to get IDirect3DRMVisual, %#x.\n", hr);
IUnknown_Release(unk);
IDirect3DRMMesh_Release(mesh);
IDirect3DRM_Release(d3drm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment