mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Change signature of get_glyph
This commit is contained in:
parent
0443624ee2
commit
f3e5ed9854
gfx
@ -140,9 +140,9 @@ static int get_message_width(gl_raster_t *font, const char *msg)
|
||||
for (i = 0; i < msg_len; i++)
|
||||
{
|
||||
const struct font_glyph *glyph =
|
||||
font->font_driver->get_glyph(font->font_data, (uint8_t)msg[i]);
|
||||
(const struct font_glyph*)font->font_driver->get_glyph(font->font_data, (uint8_t)msg[i]);
|
||||
if (!glyph)
|
||||
glyph = font->font_driver->get_glyph(font->font_data, '?'); /* Do something smarter here ... */
|
||||
glyph = (const struct font_glyph*)font->font_driver->get_glyph(font->font_data, '?'); /* Do something smarter here ... */
|
||||
if (!glyph)
|
||||
continue;
|
||||
|
||||
@ -199,9 +199,9 @@ static void render_message(gl_raster_t *font, const char *msg, GLfloat scale,
|
||||
{
|
||||
int off_x, off_y, tex_x, tex_y, width, height;
|
||||
const struct font_glyph *glyph =
|
||||
font->font_driver->get_glyph(font->font_data, (uint8_t)msg[i]);
|
||||
(const struct font_glyph*)font->font_driver->get_glyph(font->font_data, (uint8_t)msg[i]);
|
||||
if (!glyph)
|
||||
glyph = font->font_driver->get_glyph(font->font_data, '?'); /* Do something smarter here ... */
|
||||
glyph = (const struct font_glyph*)font->font_driver->get_glyph(font->font_data, '?'); /* Do something smarter here ... */
|
||||
if (!glyph)
|
||||
continue;
|
||||
|
||||
@ -345,7 +345,7 @@ static void gl_raster_font_render_msg(void *data, const char *msg,
|
||||
restore_viewport(gl);
|
||||
}
|
||||
|
||||
static const struct font_glyph *gl_raster_font_get_glyph(
|
||||
static const void *gl_raster_font_get_glyph(
|
||||
void *data, uint32_t code)
|
||||
{
|
||||
gl_raster_t *font = (gl_raster_t*)data;
|
||||
|
@ -40,7 +40,7 @@ static const struct font_atlas *font_renderer_bmp_get_atlas(void *data)
|
||||
return &handle->atlas;
|
||||
}
|
||||
|
||||
static const struct font_glyph *font_renderer_bmp_get_glyph(
|
||||
static const void *font_renderer_bmp_get_glyph(
|
||||
void *data, uint32_t code)
|
||||
{
|
||||
bm_renderer_t *handle = (bm_renderer_t*)data;
|
||||
|
@ -45,7 +45,7 @@ static const struct font_atlas *font_renderer_ct_get_atlas(void *data)
|
||||
return &handle->atlas;
|
||||
}
|
||||
|
||||
static const struct font_glyph *font_renderer_ct_get_glyph(void *data, uint32_t code)
|
||||
static const void *font_renderer_ct_get_glyph(void *data, uint32_t code)
|
||||
{
|
||||
font_renderer_t *handle = (font_renderer_t*)data;
|
||||
|
||||
|
@ -45,7 +45,7 @@ static const struct font_atlas *font_renderer_ft_get_atlas(void *data)
|
||||
return &handle->atlas;
|
||||
}
|
||||
|
||||
static const struct font_glyph *font_renderer_ft_get_glyph(
|
||||
static const void *font_renderer_ft_get_glyph(
|
||||
void *data, uint32_t code)
|
||||
{
|
||||
font_renderer_t *handle = (font_renderer_t*)data;
|
||||
|
@ -30,7 +30,7 @@ typedef struct gl_font_renderer
|
||||
void (*render_msg)(void *data, const char *msg, const void *userdata);
|
||||
const char *ident;
|
||||
|
||||
const struct font_glyph *(*get_glyph)(void *data, uint32_t code);
|
||||
const void *(*get_glyph)(void *data, uint32_t code);
|
||||
void (*bind_block)(void *data, void *block);
|
||||
void (*flush)(void *data);
|
||||
} gl_font_renderer_t;
|
||||
|
@ -62,7 +62,7 @@ typedef struct font_renderer_driver
|
||||
const struct font_atlas *(*get_atlas)(void *data);
|
||||
|
||||
/* Returns NULL if no glyph for this code is found. */
|
||||
const struct font_glyph *(*get_glyph)(void *data, uint32_t code);
|
||||
const void *(*get_glyph)(void *data, uint32_t code);
|
||||
|
||||
void (*free)(void *data);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user