Set draw->x/draw->y outside before calling MENU_DISPLAY_CTL_DRAW_BG

This commit is contained in:
twinaphex 2016-04-19 07:58:50 +02:00
parent cbcbd895d2
commit 1aa8a950ef
4 changed files with 8 additions and 2 deletions

View File

@ -707,6 +707,8 @@ static int mui_get_core_title(char *s, size_t len)
static void mui_draw_bg(menu_display_ctx_draw_t *draw)
{
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
draw->x = 0;
draw->y = 0;
menu_display_ctl(MENU_DISPLAY_CTL_DRAW_BG, draw);
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
}

View File

@ -1927,6 +1927,8 @@ static void xmb_draw_ribbon(xmb_handle_t *xmb, menu_display_ctx_draw_t *draw)
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
#else
draw->x = 0;
draw->y = 0;
menu_display_ctl(MENU_DISPLAY_CTL_DRAW_BG, draw);
#endif
}

View File

@ -983,6 +983,8 @@ static void zarch_frame(void *data)
draw.color = &coord_color2[0];
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
draw.x = 0;
draw.y = 0;
menu_display_ctl(MENU_DISPLAY_CTL_DRAW_BG, &draw);
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);

View File

@ -502,8 +502,6 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
coords.lut_tex_coord = new_tex_coord;
coords.color = (const float*)draw->color;
draw->x = 0;
draw->y = 0;
draw->coords = &coords;
if (!draw->texture)
@ -528,6 +526,8 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
draw->color = bg;
draw->texture = 0;
draw->x = 0;
draw->y = 0;
menu_display_ctl(MENU_DISPLAY_CTL_DRAW_BG, draw);
}