(XMB) Cleanups
This commit is contained in:
parent
a8b8ca7a96
commit
ab1c26d532
|
@ -1512,16 +1512,6 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
||||||
return xmb->textures.list[XMB_TEXTURE_SUBSETTING];
|
return xmb->textures.list[XMB_TEXTURE_SUBSETTING];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_blend_begin(void)
|
|
||||||
{
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void xmb_blend_end(void)
|
|
||||||
{
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void xmb_draw_items(xmb_handle_t *xmb,
|
static void xmb_draw_items(xmb_handle_t *xmb,
|
||||||
file_list_t *list, file_list_t *stack,
|
file_list_t *list, file_list_t *stack,
|
||||||
size_t current, size_t cat_selection_ptr, float *color,
|
size_t current, size_t cat_selection_ptr, float *color,
|
||||||
|
@ -1745,7 +1735,7 @@ static void xmb_draw_items(xmb_handle_t *xmb,
|
||||||
TEXT_ALIGN_LEFT,
|
TEXT_ALIGN_LEFT,
|
||||||
width, height);
|
width, height);
|
||||||
|
|
||||||
xmb_blend_begin();
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
|
||||||
|
|
||||||
/* set alpha components of color */
|
/* set alpha components of color */
|
||||||
color[3] = color[7] = color[11] = color[15] =
|
color[3] = color[7] = color[11] = color[15] =
|
||||||
|
@ -1773,7 +1763,7 @@ static void xmb_draw_items(xmb_handle_t *xmb,
|
||||||
0,
|
0,
|
||||||
1, &color[0]);
|
1, &color[0]);
|
||||||
|
|
||||||
xmb_blend_end();
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1790,7 +1780,7 @@ static void xmb_draw_cursor(xmb_handle_t *xmb,
|
||||||
coords.lut_tex_coord = NULL;
|
coords.lut_tex_coord = NULL;
|
||||||
coords.color = (const float*)color;
|
coords.color = (const float*)color;
|
||||||
|
|
||||||
xmb_blend_begin();
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
|
||||||
|
|
||||||
draw.x = x - (xmb->cursor.size / 2);
|
draw.x = x - (xmb->cursor.size / 2);
|
||||||
draw.y = height - y - (xmb->cursor.size / 2);
|
draw.y = height - y - (xmb->cursor.size / 2);
|
||||||
|
@ -1802,8 +1792,7 @@ static void xmb_draw_cursor(xmb_handle_t *xmb,
|
||||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_DRAW, &draw);
|
menu_display_ctl(MENU_DISPLAY_CTL_DRAW, &draw);
|
||||||
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
|
||||||
xmb_blend_end();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xmb_render(void *data)
|
static void xmb_render(void *data)
|
||||||
|
@ -1883,7 +1872,7 @@ static void xmb_frame_horizontal_list(xmb_handle_t *xmb,
|
||||||
if (!node)
|
if (!node)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
xmb_blend_begin();
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
|
||||||
|
|
||||||
/* set alpha components of color */
|
/* set alpha components of color */
|
||||||
color[3] = color[7] = color[11] = color[15] = (node->alpha > xmb->alpha)
|
color[3] = color[7] = color[11] = color[15] = (node->alpha > xmb->alpha)
|
||||||
|
@ -1900,7 +1889,7 @@ static void xmb_frame_horizontal_list(xmb_handle_t *xmb,
|
||||||
node->zoom,
|
node->zoom,
|
||||||
&color[0]);
|
&color[0]);
|
||||||
|
|
||||||
xmb_blend_end();
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1926,7 +1915,7 @@ static void xmb_draw_ribbon(xmb_handle_t *xmb, menu_display_ctx_draw_t *draw)
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_DRAW_GRADIENT, draw);
|
menu_display_ctl(MENU_DISPLAY_CTL_DRAW_GRADIENT, draw);
|
||||||
|
|
||||||
xmb_blend_begin();
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
|
||||||
|
|
||||||
coords.vertex = xmb->ribbon_coords.coords.vertex;
|
coords.vertex = xmb->ribbon_coords.coords.vertex;
|
||||||
coords.index = ribbon_idx;
|
coords.index = ribbon_idx;
|
||||||
|
@ -1963,7 +1952,7 @@ static void xmb_draw_ribbon(xmb_handle_t *xmb, menu_display_ctx_draw_t *draw)
|
||||||
glDrawElements(GL_TRIANGLE_STRIP,
|
glDrawElements(GL_TRIANGLE_STRIP,
|
||||||
XMB_RIBBON_INDEXES, GL_UNSIGNED_INT, draw->coords->index);
|
XMB_RIBBON_INDEXES, GL_UNSIGNED_INT, draw->coords->index);
|
||||||
|
|
||||||
xmb_blend_end();
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
|
||||||
#else
|
#else
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_DRAW_BG, draw);
|
menu_display_ctl(MENU_DISPLAY_CTL_DRAW_BG, draw);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2103,8 +2092,7 @@ static void xmb_frame(void *data)
|
||||||
rotate_draw.scale_enable = true;
|
rotate_draw.scale_enable = true;
|
||||||
|
|
||||||
menu_display_ctl(MENU_DISPLAY_CTL_ROTATE_Z, &rotate_draw);
|
menu_display_ctl(MENU_DISPLAY_CTL_ROTATE_Z, &rotate_draw);
|
||||||
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
|
||||||
xmb_blend_begin();
|
|
||||||
|
|
||||||
if (strcmp(xmb_thumbnails_ident(), "OFF") && xmb->thumbnail)
|
if (strcmp(xmb_thumbnails_ident(), "OFF") && xmb->thumbnail)
|
||||||
xmb_draw_thumbnail(xmb, &coord_color2[0], width, height);
|
xmb_draw_thumbnail(xmb, &coord_color2[0], width, height);
|
||||||
|
|
Loading…
Reference in New Issue