Tony Wasserka : d3dx9: Implement ID3DXFont_GetDevice.
Alexandre Julliard
julliard at winehq.org
Wed Jun 24 09:22:57 CDT 2009
Module: wine
Branch: master
Commit: e36028b4df36d3984dc70a97f93ccd95e8b19c3b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e36028b4df36d3984dc70a97f93ccd95e8b19c3b
Author: Tony Wasserka <tony.wasserka at freenet.de>
Date: Fri Jun 5 13:15:44 2009 +0200
d3dx9: Implement ID3DXFont_GetDevice.
---
dlls/d3dx9_36/d3dx9_36_private.h | 1 +
dlls/d3dx9_36/font.c | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/dlls/d3dx9_36/d3dx9_36_private.h b/dlls/d3dx9_36/d3dx9_36_private.h
index a2b0698..5891794 100644
--- a/dlls/d3dx9_36/d3dx9_36_private.h
+++ b/dlls/d3dx9_36/d3dx9_36_private.h
@@ -41,6 +41,7 @@ typedef struct ID3DXFontImpl
LONG ref;
/* ID3DXFont fields */
+ IDirect3DDevice9 *device;
} ID3DXFontImpl;
diff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx9_36/font.c
index e5e6569..e7f770c 100644
--- a/dlls/d3dx9_36/font.c
+++ b/dlls/d3dx9_36/font.c
@@ -55,6 +55,7 @@ static ULONG WINAPI ID3DXFontImpl_Release(LPD3DXFONT iface)
TRACE("(%p): ReleaseRef to %d\n", This, ref);
if(ref==0) {
+ IDirect3DDevice9_Release(This->device);
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
@@ -63,7 +64,12 @@ static ULONG WINAPI ID3DXFontImpl_Release(LPD3DXFONT iface)
static HRESULT WINAPI ID3DXFontImpl_GetDevice(LPD3DXFONT iface, LPDIRECT3DDEVICE9 *device)
{
ID3DXFontImpl *This=(ID3DXFontImpl*)iface;
- FIXME("(%p): stub\n", This);
+ TRACE("(%p)\n", This);
+
+ if( !device ) return D3DERR_INVALIDCALL;
+ *device = This->device;
+ IDirect3DDevice9_AddRef(This->device);
+
return D3D_OK;
}
@@ -282,7 +288,9 @@ HRESULT WINAPI D3DXCreateFontIndirectW(LPDIRECT3DDEVICE9 device, CONST D3DXFONT_
}
object->lpVtbl=&D3DXFont_Vtbl;
object->ref=1;
+ object->device=device;
+ IDirect3DDevice9_AddRef(device);
*font=(LPD3DXFONT)object;
return D3D_OK;
More information about the wine-cvs
mailing list