[WINESYNC] d3dx9: Merge the d3dx9_effect_GetDesc() helper.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 4b85165cdc297f97a3609cfab2d64d87e435397e by Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
winesync 2020-09-21 22:40:25 +02:00 committed by Jérôme Gardou
parent 280deff8df
commit 74a0f6629e
2 changed files with 15 additions and 22 deletions

View File

@ -995,25 +995,6 @@ static inline DWORD d3dx9_effect_version(DWORD major, DWORD minor)
return (0xfeff0000 | ((major) << 8) | (minor));
}
static HRESULT d3dx9_base_effect_get_desc(struct d3dx9_base_effect *base, D3DXEFFECT_DESC *desc)
{
if (!desc)
{
WARN("Invalid argument specified.\n");
return D3DERR_INVALIDCALL;
}
FIXME("partial stub!\n");
/* TODO: add creator and function count. */
desc->Creator = NULL;
desc->Functions = 0;
desc->Parameters = base->parameter_count;
desc->Techniques = base->technique_count;
return D3D_OK;
}
static HRESULT d3dx9_base_effect_get_parameter_desc(struct d3dx9_base_effect *base,
D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc)
{
@ -3423,9 +3404,21 @@ static HRESULT WINAPI d3dx_effect_GetDesc(ID3DXEffect *iface, D3DXEFFECT_DESC *d
{
struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
TRACE("iface %p, desc %p.\n", iface, desc);
FIXME("iface %p, desc %p partial stub.\n", iface, desc);
return d3dx9_base_effect_get_desc(&effect->base_effect, desc);
if (!desc)
{
WARN("Invalid argument specified.\n");
return D3DERR_INVALIDCALL;
}
/* TODO: add creator and function count. */
desc->Creator = NULL;
desc->Functions = 0;
desc->Parameters = effect->base_effect.parameter_count;
desc->Techniques = effect->base_effect.technique_count;
return D3D_OK;
}
static HRESULT WINAPI d3dx_effect_GetParameterDesc(ID3DXEffect *iface, D3DXHANDLE parameter,

View File

@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h,
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h}
tags: {wine: 715b932768d1f34815c6b0db18554e0d734bbec6}
tags: {wine: 4b85165cdc297f97a3609cfab2d64d87e435397e}