From b9b9d7ccca84a7d7a25ea5895f18fb6c2e73ca80 Mon Sep 17 00:00:00 2001 From: Misha Koshelev Date: Tue, 7 Sep 2010 19:33:22 -0500 Subject: [PATCH] d3dx9_36: Fix the D3DXCreateMesh() prototype. --- dlls/d3dx9_36/mesh.c | 2 +- dlls/d3dx9_36/tests/mesh.c | 12 ++++++------ include/d3dx9mesh.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index 28cf9d2b999..12e26da0458 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -583,7 +583,7 @@ BOOL WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *pcenter, FLOAT radius, CONST return TRUE; } -HRESULT WINAPI D3DXCreateMesh(DWORD numfaces, DWORD numvertices, DWORD options, CONST LPD3DVERTEXELEMENT9 *declaration, +HRESULT WINAPI D3DXCreateMesh(DWORD numfaces, DWORD numvertices, DWORD options, CONST D3DVERTEXELEMENT9 *declaration, LPDIRECT3DDEVICE9 device, LPD3DXMESH *mesh) { FIXME("(%d, %d, %d, %p, %p, %p): stub\n", numfaces, numvertices, options, declaration, device, mesh); diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 488515dc798..619d667795e 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -1006,7 +1006,7 @@ static void D3DXCreateMeshTest(void) hr = D3DXCreateMesh(0, 0, 0, NULL, NULL, NULL); todo_wine ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); - hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, (LPD3DVERTEXELEMENT9 *)&decl, NULL, &d3dxmesh); + hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, decl, NULL, &d3dxmesh); todo_wine ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); @@ -1035,13 +1035,13 @@ static void D3DXCreateMeshTest(void) return; } - hr = D3DXCreateMesh(0, 3, D3DXMESH_MANAGED, (LPD3DVERTEXELEMENT9 *)&decl, device, &d3dxmesh); + hr = D3DXCreateMesh(0, 3, D3DXMESH_MANAGED, decl, device, &d3dxmesh); todo_wine ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); - hr = D3DXCreateMesh(1, 0, D3DXMESH_MANAGED, (LPD3DVERTEXELEMENT9 *)&decl, device, &d3dxmesh); + hr = D3DXCreateMesh(1, 0, D3DXMESH_MANAGED, decl, device, &d3dxmesh); todo_wine ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); - hr = D3DXCreateMesh(1, 3, 0, (LPD3DVERTEXELEMENT9 *)&decl, device, &d3dxmesh); + hr = D3DXCreateMesh(1, 3, 0, decl, device, &d3dxmesh); todo_wine ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK); if (hr == D3D_OK) @@ -1052,10 +1052,10 @@ static void D3DXCreateMeshTest(void) hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, 0, device, &d3dxmesh); todo_wine ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); - hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, (LPD3DVERTEXELEMENT9 *)&decl, device, NULL); + hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, decl, device, NULL); todo_wine ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL); - hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, (LPD3DVERTEXELEMENT9 *)&decl, device, &d3dxmesh); + hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, decl, device, &d3dxmesh); todo_wine ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); if (hr == D3D_OK) diff --git a/include/d3dx9mesh.h b/include/d3dx9mesh.h index bc3dd81aa8c..32d3947cc55 100644 --- a/include/d3dx9mesh.h +++ b/include/d3dx9mesh.h @@ -150,7 +150,7 @@ DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh) extern "C" { #endif -HRESULT WINAPI D3DXCreateMesh(DWORD, DWORD, DWORD, CONST LPD3DVERTEXELEMENT9 *, LPDIRECT3DDEVICE9, LPD3DXMESH *); +HRESULT WINAPI D3DXCreateMesh(DWORD, DWORD, DWORD, CONST D3DVERTEXELEMENT9 *, LPDIRECT3DDEVICE9, LPD3DXMESH *); HRESULT WINAPI D3DXCreateBuffer(DWORD, LPD3DXBUFFER*); UINT WINAPI D3DXGetDeclVertexSize(const D3DVERTEXELEMENT9 *decl, DWORD stream_idx); UINT WINAPI D3DXGetFVFVertexSize(DWORD); -- 2.11.4.GIT