Module: wine Branch: master Commit: adbfae9b2abb3e5840179ac633b2904f429615e2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=adbfae9b2abb3e5840179ac633...
Author: Rico Schüller kgbricola@web.de Date: Sun Mar 27 22:12:54 2011 +0200
d3dx9: Implement ID3DXEffect::GetDevice().
---
dlls/d3dx9_36/effect.c | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 795b426..c90e492 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -1417,13 +1417,25 @@ static HRESULT WINAPI ID3DXEffectImpl_End(ID3DXEffect* iface) return E_NOTIMPL; }
-static HRESULT WINAPI ID3DXEffectImpl_GetDevice(ID3DXEffect* iface, LPDIRECT3DDEVICE9* device) +static HRESULT WINAPI ID3DXEffectImpl_GetDevice(ID3DXEffect *iface, LPDIRECT3DDEVICE9 *device) { struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface);
- FIXME("(%p)->(%p): stub\n", This, device); + TRACE("iface %p, device %p\n", This, device);
- return E_NOTIMPL; + if (!device) + { + WARN("Invalid argument supplied.\n"); + return D3DERR_INVALIDCALL; + } + + IDirect3DDevice9_AddRef(This->device); + + *device = This->device; + + TRACE("Returning device %p\n", *device); + + return S_OK; }
static HRESULT WINAPI ID3DXEffectImpl_OnLostDevice(ID3DXEffect* iface)