d3drm: Fix IDirect3DRMMeshBuilder::QueryInterface to support IDirect3DRMObject and IDirect3DRMVisual.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c75c8e7f53
commit
99e0442acc
|
@ -361,6 +361,8 @@ static HRESULT WINAPI d3drm_mesh_builder2_QueryInterface(IDirect3DRMMeshBuilder2
|
|||
|
||||
if (IsEqualGUID(riid, &IID_IDirect3DRMMeshBuilder2)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DRMMeshBuilder)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DRMVisual)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DRMObject)
|
||||
|| IsEqualGUID(riid, &IID_IUnknown))
|
||||
{
|
||||
*out = &mesh_builder->IDirect3DRMMeshBuilder2_iface;
|
||||
|
|
|
@ -203,6 +203,7 @@ static void test_MeshBuilder(void)
|
|||
HRESULT hr;
|
||||
IDirect3DRM *d3drm;
|
||||
IDirect3DRMMeshBuilder *pMeshBuilder;
|
||||
IDirect3DRMMeshBuilder3 *meshbuilder3;
|
||||
IDirect3DRMMesh *mesh;
|
||||
D3DRMLOADMEMORY info;
|
||||
int val;
|
||||
|
@ -215,6 +216,7 @@ static void test_MeshBuilder(void)
|
|||
DWORD size;
|
||||
D3DCOLOR color;
|
||||
CHAR cname[64] = {0};
|
||||
IUnknown *unk;
|
||||
|
||||
hr = Direct3DRMCreate(&d3drm);
|
||||
ok(hr == D3DRM_OK, "Cannot get IDirect3DRM interface (hr = %x)\n", hr);
|
||||
|
@ -222,6 +224,31 @@ static void test_MeshBuilder(void)
|
|||
hr = IDirect3DRM_CreateMeshBuilder(d3drm, &pMeshBuilder);
|
||||
ok(hr == D3DRM_OK, "Cannot get IDirect3DRMMeshBuilder interface (hr = %x)\n", hr);
|
||||
|
||||
hr = IDirect3DRMMeshBuilder_QueryInterface(pMeshBuilder, &IID_IDirect3DRMObject, (void **)&unk);
|
||||
ok(SUCCEEDED(hr), "Failed to get IDirect3DRMObject, %#x.\n", hr);
|
||||
ok(unk == (IUnknown *)pMeshBuilder, "Unexpected interface pointer.\n");
|
||||
IUnknown_Release(unk);
|
||||
|
||||
hr = IDirect3DRMMeshBuilder_QueryInterface(pMeshBuilder, &IID_IDirect3DRMVisual, (void **)&unk);
|
||||
ok(SUCCEEDED(hr), "Failed to get IDirect3DRMVisual, %#x.\n", hr);
|
||||
ok(unk == (IUnknown *)pMeshBuilder, "Unexpected interface pointer.\n");
|
||||
IUnknown_Release(unk);
|
||||
|
||||
hr = IDirect3DRMMeshBuilder_QueryInterface(pMeshBuilder, &IID_IDirect3DRMMeshBuilder3, (void **)&meshbuilder3);
|
||||
ok(SUCCEEDED(hr), "Failed to get IDirect3DRMMeshBuilder3, %#x.\n", hr);
|
||||
|
||||
hr = IDirect3DRMMeshBuilder3_QueryInterface(meshbuilder3, &IID_IDirect3DRMObject, (void **)&unk);
|
||||
ok(SUCCEEDED(hr), "Failed to get IDirect3DRMObject, %#x.\n", hr);
|
||||
ok(unk == (IUnknown *)pMeshBuilder, "Unexpected interface pointer.\n");
|
||||
IUnknown_Release(unk);
|
||||
|
||||
hr = IDirect3DRMMeshBuilder3_QueryInterface(meshbuilder3, &IID_IDirect3DRMVisual, (void **)&unk);
|
||||
ok(SUCCEEDED(hr), "Failed to get IDirect3DRMVisual, %#x.\n", hr);
|
||||
ok(unk == (IUnknown *)pMeshBuilder, "Unexpected interface pointer.\n");
|
||||
IUnknown_Release(unk);
|
||||
|
||||
IDirect3DRMMeshBuilder3_Release(meshbuilder3);
|
||||
|
||||
hr = IDirect3DRMMeshBuilder_GetClassName(pMeshBuilder, NULL, cname);
|
||||
ok(hr == E_INVALIDARG, "GetClassName failed with %x\n", hr);
|
||||
hr = IDirect3DRMMeshBuilder_GetClassName(pMeshBuilder, NULL, NULL);
|
||||
|
|
Loading…
Reference in New Issue