From ce15a9c42b1b1276fe35ae0c4a17271c1c5aba7f Mon Sep 17 00:00:00 2001 From: Gondos Date: Sun, 1 Sep 2024 01:22:08 +0200 Subject: [PATCH] [DX9]Fix oapiSetMaterialEx --- OVP/D3D9Client/D3D9Client.cpp | 2 +- OVP/D3D9Client/D3D9Client.h | 2 +- OVP/D3D9Client/gcConst.cpp | 2 +- OVP/D3D9Client/gcCore.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OVP/D3D9Client/D3D9Client.cpp b/OVP/D3D9Client/D3D9Client.cpp index c39a74a71..f9c5ff7a2 100644 --- a/OVP/D3D9Client/D3D9Client.cpp +++ b/OVP/D3D9Client/D3D9Client.cpp @@ -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; diff --git a/OVP/D3D9Client/D3D9Client.h b/OVP/D3D9Client/D3D9Client.h index cf40049f8..7efe1a128 100644 --- a/OVP/D3D9Client/D3D9Client.h +++ b/OVP/D3D9Client/D3D9Client.h @@ -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. diff --git a/OVP/D3D9Client/gcConst.cpp b/OVP/D3D9Client/gcConst.cpp index 941c545d7..e319f9e3c 100644 --- a/OVP/D3D9Client/gcConst.cpp +++ b/OVP/D3D9Client/gcConst.cpp @@ -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); } diff --git a/OVP/D3D9Client/gcCore.cpp b/OVP/D3D9Client/gcCore.cpp index eb146e52b..76c0d04be 100644 --- a/OVP/D3D9Client/gcCore.cpp +++ b/OVP/D3D9Client/gcCore.cpp @@ -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); } // ===============================================================================================