Skip to content

Commit

Permalink
Merge pull request #489 from TheGondos/dx9_setmeshmaterialex
Browse files Browse the repository at this point in the history
[DX9]Fix oapiSetMaterialEx
  • Loading branch information
jarmonik authored Sep 6, 2024
2 parents 2fec70a + ce15a9c commit 4800e52
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OVP/D3D9Client/D3D9Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,7 @@ int D3D9Client::clbkMeshMaterial (DEVMESHHANDLE hMesh, DWORD matidx, MATERIAL *m

// ==============================================================

int D3D9Client::clbkSetMaterialEx(DEVMESHHANDLE hMesh, DWORD matidx, MatProp mat, const oapi::FVECTOR4* in)
int D3D9Client::clbkSetMeshMaterialEx(DEVMESHHANDLE hMesh, DWORD matidx, MatProp mat, const oapi::FVECTOR4* in)
{
if (!hMesh) return 3;
D3D9Mesh* mesh = (D3D9Mesh*)hMesh;
Expand Down
2 changes: 1 addition & 1 deletion OVP/D3D9Client/D3D9Client.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class D3D9Client : public GraphicsClient
* \default, None, returns 2 ("client does not support operation").
*/
int clbkSetMeshMaterial(DEVMESHHANDLE hMesh, DWORD matidx, const MATERIAL* mat);
int clbkSetMaterialEx(DEVMESHHANDLE hMesh, DWORD matidx, MatProp mat, const oapi::FVECTOR4* in);
int clbkSetMeshMaterialEx(DEVMESHHANDLE hMesh, DWORD matidx, MatProp mat, const oapi::FVECTOR4* in);

/**
* \brief Retrieve the properties of one of the mesh materials.
Expand Down
2 changes: 1 addition & 1 deletion OVP/D3D9Client/gcConst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ int gcConst::MeshMaterial(DEVMESHHANDLE hMesh, DWORD idx, int prop, FVECTOR4* va
if (prop == MESHM_METALNESS) mat = MatProp::Metal;
if (prop == MESHM_SPECIALFX) mat = MatProp::SpecialFX;

if (bSet) return g_client->clbkSetMaterialEx(hMesh, idx, mat, value);
if (bSet) return g_client->clbkSetMeshMaterialEx(hMesh, idx, mat, value);
return g_client->clbkMeshMaterialEx(hMesh, idx, mat, value);
}

Expand Down
2 changes: 1 addition & 1 deletion OVP/D3D9Client/gcCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ int gcCore::GetMeshMaterial(DEVMESHHANDLE hMesh, DWORD idx, MatProp prop, FVECTO
//
int gcCore::SetMeshMaterial(DEVMESHHANDLE hMesh, DWORD idx, MatProp prop, const FVECTOR4* value)
{
return g_client->clbkSetMaterialEx(hMesh, idx, prop, value);
return g_client->clbkSetMeshMaterialEx(hMesh, idx, prop, value);
}

// ===============================================================================================
Expand Down

0 comments on commit 4800e52

Please sign in to comment.