mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
d3dx9: Implement ID3DXFont_GetDC.
This commit is contained in:
parent
05843d4770
commit
9733856f90
@ -4,7 +4,7 @@ SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = d3dx9_36.dll
|
||||
IMPORTLIB = d3dx9
|
||||
IMPORTS = d3d9 d3dx8 kernel32
|
||||
IMPORTS = d3d9 d3dx8 gdi32 kernel32
|
||||
|
||||
C_SRCS = \
|
||||
d3dx9_36_main.c \
|
||||
|
@ -43,6 +43,8 @@ typedef struct ID3DXFontImpl
|
||||
/* ID3DXFont fields */
|
||||
IDirect3DDevice9 *device;
|
||||
D3DXFONT_DESCW desc;
|
||||
|
||||
HDC hdc;
|
||||
} ID3DXFontImpl;
|
||||
|
||||
|
||||
|
@ -55,6 +55,7 @@ static ULONG WINAPI ID3DXFontImpl_Release(LPD3DXFONT iface)
|
||||
TRACE("(%p): ReleaseRef to %d\n", This, ref);
|
||||
|
||||
if(ref==0) {
|
||||
DeleteDC(This->hdc);
|
||||
IDirect3DDevice9_Release(This->device);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
@ -113,8 +114,8 @@ static BOOL WINAPI ID3DXFontImpl_GetTextMetricsW(LPD3DXFONT iface, TEXTMETRICW *
|
||||
static HDC WINAPI ID3DXFontImpl_GetDC(LPD3DXFONT iface)
|
||||
{
|
||||
ID3DXFontImpl *This=(ID3DXFontImpl*)iface;
|
||||
FIXME("(%p): stub\n", This);
|
||||
return NULL;
|
||||
TRACE("(%p)\n", This);
|
||||
return This->hdc;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ID3DXFontImpl_GetGlyphData(LPD3DXFONT iface, UINT glyph, LPDIRECT3DTEXTURE9 *texture, RECT *blackbox, POINT *cellinc)
|
||||
@ -300,6 +301,12 @@ HRESULT WINAPI D3DXCreateFontIndirectW(LPDIRECT3DDEVICE9 device, CONST D3DXFONT_
|
||||
object->device=device;
|
||||
object->desc=*desc;
|
||||
|
||||
object->hdc = CreateCompatibleDC(NULL);
|
||||
if( !object->hdc ) {
|
||||
HeapFree(GetProcessHeap(), 0, object);
|
||||
return D3DXERR_INVALIDDATA;
|
||||
}
|
||||
|
||||
IDirect3DDevice9_AddRef(device);
|
||||
*font=(LPD3DXFONT)object;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user