mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-20 09:34:09 +00:00
Add pipeline.active to menu_display_draw_ctx_t
This commit is contained in:
parent
04c23189e9
commit
fbb7dbd36b
@ -844,9 +844,10 @@ static void mui_draw_bg(menu_display_ctx_draw_t *draw)
|
||||
{
|
||||
menu_display_blend_begin();
|
||||
|
||||
draw->x = 0;
|
||||
draw->y = 0;
|
||||
draw->pipeline.id = 0;
|
||||
draw->x = 0;
|
||||
draw->y = 0;
|
||||
draw->pipeline.id = 0;
|
||||
draw->pipeline.active = false;
|
||||
|
||||
menu_display_draw_bg(draw, false);
|
||||
menu_display_draw(draw);
|
||||
|
@ -275,8 +275,9 @@ static void nk_draw_bg(
|
||||
menu_display_blend_begin();
|
||||
menu_display_set_viewport();
|
||||
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU_5;
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU_5;
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU_5;
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU_5;
|
||||
draw.pipeline.active = false;
|
||||
|
||||
menu_display_draw_pipeline(&draw);
|
||||
menu_display_draw(&draw);
|
||||
|
@ -2399,6 +2399,15 @@ static void xmb_render(void *data)
|
||||
menu_animation_ctl(MENU_ANIMATION_CTL_CLEAR_ACTIVE, NULL);
|
||||
}
|
||||
|
||||
static bool xmb_shader_pipeline_active(settings_t *settings)
|
||||
{
|
||||
if (!string_is_equal(menu_driver_ident(), "xmb"))
|
||||
return false;
|
||||
if (settings->menu.xmb.shader_pipeline == XMB_SHADER_PIPELINE_WALLPAPER)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void xmb_draw_bg(
|
||||
xmb_handle_t *xmb,
|
||||
unsigned width,
|
||||
@ -2428,6 +2437,7 @@ static void xmb_draw_bg(
|
||||
draw.vertex_count = 4;
|
||||
draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP;
|
||||
draw.pipeline.id = 0;
|
||||
draw.pipeline.active = xmb_shader_pipeline_active(settings);
|
||||
|
||||
menu_display_blend_begin();
|
||||
menu_display_set_viewport();
|
||||
|
@ -484,15 +484,6 @@ void menu_display_draw(menu_display_ctx_draw_t *draw)
|
||||
menu_disp->draw(draw);
|
||||
}
|
||||
|
||||
static bool menu_display_shader_pipeline_active(settings_t *settings)
|
||||
{
|
||||
if (!string_is_equal(menu_driver_ident(), "xmb"))
|
||||
return false;
|
||||
if (settings->menu.xmb.shader_pipeline == XMB_SHADER_PIPELINE_WALLPAPER)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void menu_display_draw_pipeline(menu_display_ctx_draw_t *draw)
|
||||
{
|
||||
if (!menu_disp || !draw || !menu_disp->draw_pipeline)
|
||||
@ -505,7 +496,6 @@ void menu_display_draw_bg(menu_display_ctx_draw_t *draw, bool add_opacity_to_wal
|
||||
static struct video_coords coords;
|
||||
const float *new_vertex = NULL;
|
||||
const float *new_tex_coord = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!menu_disp || !draw)
|
||||
return;
|
||||
|
||||
@ -525,11 +515,14 @@ void menu_display_draw_bg(menu_display_ctx_draw_t *draw, bool add_opacity_to_wal
|
||||
|
||||
draw->coords = &coords;
|
||||
|
||||
if (!menu_display_libretro_running() && !menu_display_shader_pipeline_active(settings))
|
||||
if (!menu_display_libretro_running() && !draw->pipeline.active)
|
||||
add_opacity_to_wallpaper = true;
|
||||
|
||||
if (add_opacity_to_wallpaper)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
menu_display_set_alpha(draw->color, settings->menu.wallpaper.opacity);
|
||||
}
|
||||
|
||||
if (!draw->texture)
|
||||
draw->texture = menu_display_white_texture;
|
||||
|
@ -129,6 +129,7 @@ typedef struct menu_display_ctx_draw
|
||||
{
|
||||
unsigned id;
|
||||
const void *backend_data;
|
||||
bool active;
|
||||
} pipeline;
|
||||
} menu_display_ctx_draw_t;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user