Module: wine Branch: master Commit: 46b3727df3eec7b5ce649a28da78e6008d848f6b URL: http://source.winehq.org/git/wine.git/?a=commit;h=46b3727df3eec7b5ce649a28da...
Author: Rico Schüller kgbricola@web.de Date: Tue May 3 14:46:52 2011 +0200
d3dx9: Implement ID3DXBaseEffect::GetValue().
---
dlls/d3dx9_36/effect.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 81ef017..6373f1c 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -969,10 +969,22 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_SetValue(ID3DXBaseEffect *iface, D3DXH static HRESULT WINAPI ID3DXBaseEffectImpl_GetValue(ID3DXBaseEffect *iface, D3DXHANDLE parameter, LPVOID data, UINT bytes) { struct ID3DXBaseEffectImpl *This = impl_from_ID3DXBaseEffect(iface); + struct d3dx_parameter *param = is_valid_parameter(This, parameter);
- FIXME("iface %p, parameter %p, data %p, bytes %u stub\n", This, parameter, data, bytes); + TRACE("iface %p, parameter %p, data %p, bytes %u\n", This, parameter, data, bytes);
- return E_NOTIMPL; + if (!param) param = get_parameter_by_name(This, NULL, parameter); + + if (data && param && param->data && param->bytes <= bytes) + { + TRACE("Copy %u bytes\n", param->bytes); + memcpy(data, param->data, param->bytes); + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; }
static HRESULT WINAPI ID3DXBaseEffectImpl_SetBool(ID3DXBaseEffect *iface, D3DXHANDLE parameter, BOOL b)