Simplify menu_display_font_flush_block

This commit is contained in:
twinaphex 2015-04-24 23:28:25 +02:00
parent 86958c4117
commit a79511e27f
3 changed files with 14 additions and 14 deletions

View File

@ -547,8 +547,7 @@ static void glui_frame(void)
TEXT_ALIGN_RIGHT);
}
if (menu_display_font_flush_block(menu, font_driver))
menu_display_font_bind_block(menu, font_driver, NULL);
menu_display_font_flush_block(menu, font_driver);
if (menu->keyboard.display)
{

View File

@ -1423,8 +1423,7 @@ static void xmb_frame(void)
}
}
if (menu_display_font_flush_block(menu, font_driver))
menu_display_font_bind_block(menu, font_driver, NULL);
menu_display_font_flush_block(menu, font_driver);
if (menu->keyboard.display)
{

View File

@ -133,16 +133,6 @@ bool menu_display_font_init_first(const void **font_driver,
font_path, font_size, FONT_DRIVER_RENDER_OPENGL_API);
}
bool menu_display_font_flush_block(menu_handle_t *menu,
const struct font_renderer *font_driver)
{
if (!font_driver || !font_driver->flush)
return false;
font_driver->flush(menu->font.buf);
return true;
}
bool menu_display_font_bind_block(menu_handle_t *menu,
const struct font_renderer *font_driver, void *userdata)
{
@ -153,3 +143,15 @@ bool menu_display_font_bind_block(menu_handle_t *menu,
return true;
}
bool menu_display_font_flush_block(menu_handle_t *menu,
const struct font_renderer *font_driver)
{
if (!font_driver || !font_driver->flush)
return false;
font_driver->flush(menu->font.buf);
return menu_display_font_bind_block(menu,
font_driver, NULL);
}