mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-26 12:48:27 +00:00
Change signature of d3d_font_init_first
This commit is contained in:
parent
bfbcbb6ae8
commit
07d28f7b31
@ -308,10 +308,10 @@ static bool d3d_initialize(d3d_video_t *d3d, const video_info_t *info)
|
||||
strlcpy(settings->video.font_path, "game:\\media\\Arial_12.xpr",
|
||||
sizeof(settings->video.font_path));
|
||||
#endif
|
||||
d3d->font_ctx = d3d_font_init_first(d3d, settings->video.font_path, 0);
|
||||
if (!d3d->font_ctx)
|
||||
if (!d3d_font_init_first(&d3d->font_ctx, NULL,
|
||||
d3d, settings->video.font_path, 0))
|
||||
{
|
||||
RARCH_ERR("Failed to initialize font.\n");
|
||||
RARCH_ERR("[D3D]: Failed to initialize font renderer.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -27,16 +27,21 @@ static const d3d_font_renderer_t *d3d_font_backends[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
const d3d_font_renderer_t *d3d_font_init_first(void *data,
|
||||
const char *font_path, unsigned font_size)
|
||||
bool d3d_font_init_first(
|
||||
const void **font_driver, void **font_handle,
|
||||
void *video_data, const char *font_path, unsigned font_size)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(d3d_font_backends); i++)
|
||||
{
|
||||
if (d3d_font_backends[i]->init(data, font_path, font_size))
|
||||
return d3d_font_backends[i];
|
||||
if (!d3d_font_backends[i]->init(video_data, font_path, font_size))
|
||||
return false;
|
||||
|
||||
*font_driver = d3d_font_backends[i];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
|
@ -42,8 +42,9 @@ extern d3d_font_renderer_t d3d_xbox360_font;
|
||||
extern d3d_font_renderer_t d3d_xdk1_font;
|
||||
extern d3d_font_renderer_t d3d_win32_font;
|
||||
|
||||
const d3d_font_renderer_t *d3d_font_init_first(void *data,
|
||||
const char *font_path, unsigned font_size);
|
||||
bool d3d_font_init_first(
|
||||
const void **font_driver, void **font_handle,
|
||||
void *video_data, const char *font_path, unsigned font_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user