From 18b0fb1422b5cc79899a7990bb7ef09317eff38b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 24 Apr 2016 22:56:28 +0200 Subject: [PATCH] (Menu) Cleanups --- menu/drivers/xmb.c | 4 ++++ menu/menu_display.c | 5 +---- menu/menu_display.h | 4 ++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index f0ee39496e..39ff121dfe 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1911,6 +1911,10 @@ static void xmb_draw_bg( else menu_display_set_alpha(draw.color, coord_white[3]); + draw.pipeline.id = VIDEO_SHADER_MENU_SEC; + if (settings->menu.xmb_ribbon_enable == 2) + draw.pipeline.id = VIDEO_SHADER_MENU; + menu_display_ctl(MENU_DISPLAY_CTL_DRAW_GRADIENT, &draw); menu_display_ctl(MENU_DISPLAY_CTL_DRAW_RIBBON, &draw); } diff --git a/menu/menu_display.c b/menu/menu_display.c index 4eb7b10171..39cbb3dc81 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -547,12 +547,9 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data) #if defined(HAVE_GLSL) || defined(HAVE_CG) || defined(HAVE_HLSL) shader_info.data = NULL; - shader_info.idx = VIDEO_SHADER_MENU_SEC; + shader_info.idx = draw->pipeline.id; shader_info.set_active = true; - if (settings->menu.xmb_ribbon_enable == 2) - shader_info.idx = VIDEO_SHADER_MENU; - video_shader_driver_ctl(SHADER_CTL_USE, &shader_info); t += 0.01; diff --git a/menu/menu_display.h b/menu/menu_display.h index 9cb3a79e2e..9da1aec351 100644 --- a/menu/menu_display.h +++ b/menu/menu_display.h @@ -121,6 +121,10 @@ typedef struct menu_display_ctx_draw const float *vertex; const float *tex_coord; size_t vertex_count; + struct + { + unsigned id; + } pipeline; } menu_display_ctx_draw_t; typedef struct menu_display_ctx_rotate_draw