(GLUI,XMB) Fix OSD

This commit is contained in:
Higor Eurípedes 2015-03-25 13:42:25 -03:00
parent 246bf83315
commit 8fc5818130
3 changed files with 13 additions and 13 deletions

View File

@ -354,7 +354,7 @@ static const struct font_glyph *gl_raster_font_get_glyph(
static void gl_flush_block(void *data) static void gl_flush_block(void *data)
{ {
gl_raster_t *font = (gl_raster_t*)data; gl_raster_t *font = (gl_raster_t*)data;
gl_font_raster_block_t *block = font->block; gl_font_raster_block_t *block = font->block;
if (block->carr.coords.vertices) if (block->carr.coords.vertices)

View File

@ -359,6 +359,9 @@ static void glui_frame(void)
glui_render_background(settings, gl, glui, false); glui_render_background(settings, gl, glui, false);
if (gl->font_driver->bind_block)
gl->font_driver->bind_block(gl->font_handle, &glui->raster_block);
if (!menu_display_update_pending()) if (!menu_display_update_pending())
goto draw_text; goto draw_text;
@ -480,7 +483,10 @@ static void glui_frame(void)
draw_text: draw_text:
if (gl->font_driver->flush) if (gl->font_driver->flush)
{
gl->font_driver->flush(gl->font_handle); gl->font_driver->flush(gl->font_handle);
gl->font_driver->bind_block(gl->font_handle, NULL);
}
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true); gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
} }
@ -511,9 +517,6 @@ static void *glui_init(void)
glui = (glui_handle_t*)menu->userdata; glui = (glui_handle_t*)menu->userdata;
glui->textures.bg.id = 0; glui->textures.bg.id = 0;
if (gl->font_driver->bind_block)
gl->font_driver->bind_block(gl->font_handle, &glui->raster_block);
return menu; return menu;
error: error:
if (menu) if (menu)
@ -621,9 +624,6 @@ static void glui_context_reset(void)
texture_image_free(&ti); texture_image_free(&ti);
} }
if (gl->font_driver->bind_block)
gl->font_driver->bind_block(gl->font_handle, &glui->raster_block);
} }
static void glui_navigation_clear(bool pending_push) static void glui_navigation_clear(bool pending_push)

View File

@ -1266,6 +1266,9 @@ static void xmb_frame(void)
if (!gl) if (!gl)
return; return;
if (gl->font_driver->bind_block)
gl->font_driver->bind_block(gl->font_handle, &xmb->raster_block);
xmb_frame_background(settings, gl, xmb, false); xmb_frame_background(settings, gl, xmb, false);
xmb_draw_text(gl, xmb, xmb_draw_text(gl, xmb,
@ -1381,7 +1384,10 @@ static void xmb_frame(void)
} }
if (gl->font_driver->flush) if (gl->font_driver->flush)
{
gl->font_driver->flush(gl->font_handle); gl->font_driver->flush(gl->font_handle);
gl->font_driver->bind_block(gl->font_handle, NULL);
}
if (settings->menu.mouse.enable) if (settings->menu.mouse.enable)
xmb_draw_cursor(gl, xmb, menu->mouse.x, menu->mouse.y); xmb_draw_cursor(gl, xmb, menu->mouse.x, menu->mouse.y);
@ -1488,9 +1494,6 @@ static void *xmb_init(void)
if (global->core_info) if (global->core_info)
menu->categories.size = global->core_info->count + 1; menu->categories.size = global->core_info->count + 1;
if (gl->font_driver->bind_block)
gl->font_driver->bind_block(gl->font_handle, &xmb->raster_block);
return menu; return menu;
error: error:
@ -1785,9 +1788,6 @@ static void xmb_context_reset(void)
else if (xmb->depth <= 1) else if (xmb->depth <= 1)
node->alpha = xmb->categories.passive.alpha; node->alpha = xmb->categories.passive.alpha;
} }
if (gl->font_driver->bind_block)
gl->font_driver->bind_block(gl->font_handle, &xmb->raster_block);
} }
static void xmb_navigation_clear(bool pending_push) static void xmb_navigation_clear(bool pending_push)