mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Create font_driver_flush
This commit is contained in:
parent
df1c6344be
commit
df813ad58b
@ -233,6 +233,15 @@ void font_driver_bind_block(void *font_data, void *block)
|
|||||||
font_ctx->bind_block(new_font_data, block);
|
font_ctx->bind_block(new_font_data, block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void font_driver_flush(void *data)
|
||||||
|
{
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
|
const font_renderer_t *font_ctx = driver->font_osd_driver;
|
||||||
|
|
||||||
|
if (font_ctx->flush)
|
||||||
|
font_ctx->flush(data);
|
||||||
|
}
|
||||||
|
|
||||||
void font_driver_free(void *data)
|
void font_driver_free(void *data)
|
||||||
{
|
{
|
||||||
driver_t *driver = driver_get_ptr();
|
driver_t *driver = driver_get_ptr();
|
||||||
@ -287,3 +296,4 @@ bool font_driver_init_first(const void **font_driver, void *font_handle,
|
|||||||
return font_init_first(new_font_driver, new_font_handle,
|
return font_init_first(new_font_driver, new_font_handle,
|
||||||
data, font_path, font_size, api);
|
data, font_path, font_size, api);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,6 +140,8 @@ void font_driver_render_msg(void *data, const char *msg, const struct font_param
|
|||||||
|
|
||||||
void font_driver_bind_block(void *font_data, void *block);
|
void font_driver_bind_block(void *font_data, void *block);
|
||||||
|
|
||||||
|
void font_driver_flush(void *data);
|
||||||
|
|
||||||
void font_driver_free(void *data);
|
void font_driver_free(void *data);
|
||||||
|
|
||||||
bool font_driver_init_first(const void **font_driver, void *font_handle,
|
bool font_driver_init_first(const void **font_driver, void *font_handle,
|
||||||
|
@ -156,13 +156,11 @@ bool menu_display_font_bind_block(void *userdata)
|
|||||||
|
|
||||||
bool menu_display_font_flush_block(void)
|
bool menu_display_font_flush_block(void)
|
||||||
{
|
{
|
||||||
driver_t *driver = driver_get_ptr();
|
|
||||||
menu_display_t *disp = menu_display_get_ptr();
|
menu_display_t *disp = menu_display_get_ptr();
|
||||||
const struct font_renderer *font_driver = driver->font_osd_driver;
|
if (!disp || !disp->font.buf)
|
||||||
if (!font_driver || !font_driver->flush || !disp || !disp->font.buf)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
font_driver->flush(disp->font.buf);
|
font_driver_flush(disp->font.buf);
|
||||||
|
|
||||||
return menu_display_font_bind_block(NULL);
|
return menu_display_font_bind_block(NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user