mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Create d3d_font_indirect
This commit is contained in:
parent
94b04828f9
commit
d3480e6365
@ -1202,3 +1202,21 @@ void *d3d_matrix_rotation_z(void *_pout, float angle)
|
||||
pout->m[1][0] = -sin(angle);
|
||||
return pout;
|
||||
}
|
||||
|
||||
bool d3d_create_font_indirect(LPDIRECT3DDEVICE dev,
|
||||
void *desc, void **font_data)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
#ifdef __cplusplus
|
||||
if (FAILED(D3DXCreateFontIndirect(
|
||||
dev, (D3DXFONT_DESC*)desc, font_data)))
|
||||
return false;
|
||||
#else
|
||||
if (FAILED(D3DXCreateFontIndirect(
|
||||
dev, (D3DXFONT_DESC*)desc,
|
||||
(struct ID3DXFont**)font_data)))
|
||||
return false;
|
||||
#endif
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
@ -179,6 +179,9 @@ bool d3d_initialize_symbols(void);
|
||||
|
||||
void d3d_deinitialize_symbols(void);
|
||||
|
||||
bool d3d_create_font_indirect(LPDIRECT3DDEVICE dev,
|
||||
void *desc, void **font_data);
|
||||
|
||||
D3DTEXTUREFILTERTYPE d3d_translate_filter(unsigned type);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
@ -77,16 +77,9 @@ static void *d3dfonts_w32_init_font(void *video_data,
|
||||
d3dfonts->d3d = (d3d_video_t*)video_data;
|
||||
d3dfonts->color = D3DCOLOR_XRGB(r, g, b);
|
||||
|
||||
#ifdef __cplusplus
|
||||
if (FAILED(D3DXCreateFontIndirect(
|
||||
d3dfonts->d3d->dev, &desc, &d3dfonts->font)))
|
||||
if (!d3d_create_font_indirect(d3dfonts->d3d->dev,
|
||||
&desc, (void**)&d3dfonts->font))
|
||||
goto error;
|
||||
#else
|
||||
if (FAILED(D3DXCreateFontIndirect(
|
||||
d3dfonts->d3d->dev, &desc,
|
||||
(struct ID3DXFont**)&d3dfonts->font)))
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
return d3dfonts;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user