mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(XMB) Use a separate function to darken the screen
This commit is contained in:
parent
a4308640a2
commit
fe255f103e
@ -1893,6 +1893,39 @@ static void xmb_draw_bg(
|
|||||||
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void xmb_draw_dark_layer(
|
||||||
|
xmb_handle_t *xmb,
|
||||||
|
unsigned width,
|
||||||
|
unsigned height)
|
||||||
|
{
|
||||||
|
menu_display_ctx_draw_t draw;
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
|
float black[16] = {
|
||||||
|
0, 0, 0, 1,
|
||||||
|
0, 0, 0, 1,
|
||||||
|
0, 0, 0, 1,
|
||||||
|
0, 0, 0, 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
menu_display_set_alpha(black, xmb->alpha < 0.75 ? xmb->alpha : 0.75);
|
||||||
|
|
||||||
|
draw.x = 0;
|
||||||
|
draw.y = 0;
|
||||||
|
draw.width = width;
|
||||||
|
draw.height = height;
|
||||||
|
draw.color = &black[0];
|
||||||
|
draw.vertex = NULL;
|
||||||
|
draw.tex_coord = NULL;
|
||||||
|
draw.vertex_count = 4;
|
||||||
|
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||||
|
|
||||||
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
|
||||||
|
menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL);
|
||||||
|
menu_display_ctl(MENU_DISPLAY_CTL_DRAW_BG, &draw);
|
||||||
|
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
static void xmb_frame(void *data)
|
static void xmb_frame(void *data)
|
||||||
{
|
{
|
||||||
size_t selection;
|
size_t selection;
|
||||||
@ -2124,15 +2157,7 @@ static void xmb_frame(void *data)
|
|||||||
|
|
||||||
if (render_background)
|
if (render_background)
|
||||||
{
|
{
|
||||||
xmb_draw_bg(
|
xmb_draw_dark_layer(xmb, width, height);
|
||||||
xmb,
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
xmb->alpha,
|
|
||||||
true,
|
|
||||||
xmb->textures.bg,
|
|
||||||
coord_color,
|
|
||||||
coord_color2);
|
|
||||||
|
|
||||||
xmb_render_messagebox_internal(xmb, msg);
|
xmb_render_messagebox_internal(xmb, msg);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user