Merge pull request #2868 from libretro/revert-2867-master

Revert "(XMB) Apply  the fade in animation on the ribbon when launching RA or…"
This commit is contained in:
Twinaphex 2016-04-16 23:18:33 +02:00
commit 6144ca0e31
2 changed files with 16 additions and 21 deletions

View File

@ -1900,8 +1900,7 @@ static void xmb_frame_horizontal_list(xmb_handle_t *xmb,
} }
} }
static void xmb_draw_ribbon(xmb_handle_t *xmb, static void xmb_draw_ribbon(menu_display_ctx_draw_t *draw)
menu_display_ctx_draw_t *draw)
{ {
#ifdef XMB_RIBBON_ENABLE #ifdef XMB_RIBBON_ENABLE
struct uniform_info uniform_param = {0}; struct uniform_info uniform_param = {0};
@ -1910,23 +1909,13 @@ static void xmb_draw_ribbon(xmb_handle_t *xmb,
video_shader_ctx_info_t shader_info; video_shader_ctx_info_t shader_info;
math_matrix_4x4 mymat; math_matrix_4x4 mymat;
struct gfx_coords coords; struct gfx_coords coords;
float white[16] = { float white[16] = {
1, 1, 1, xmb->alpha, 1, 1, 1, 1,
1, 1, 1, xmb->alpha, 1, 1, 1, 1,
1, 1, 1, xmb->alpha, 1, 1, 1, 1,
1, 1, 1, xmb->alpha, 1, 1, 1, 1,
}; };
float gradient[16] = {
1 , 0 , 0.1 , xmb->alpha,
1 , 0.1, 0 , xmb->alpha,
0.05, 0 , 0.05, xmb->alpha,
0.05, 0 , 0.05, xmb->alpha,
};
draw->color = gradient;
menu_display_ctl(MENU_DISPLAY_CTL_DRAW_GRADIENT, draw); menu_display_ctl(MENU_DISPLAY_CTL_DRAW_GRADIENT, draw);
xmb_blend_begin(); xmb_blend_begin();
@ -1968,12 +1957,12 @@ static void xmb_draw_ribbon(xmb_handle_t *xmb,
#endif #endif
} }
static void xmb_draw_bg(xmb_handle_t *xmb, menu_display_ctx_draw_t *draw) static void xmb_draw_bg(menu_display_ctx_draw_t *draw)
{ {
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL); menu_display_ctl(MENU_DISPLAY_CTL_BLEND_BEGIN, NULL);
menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL); menu_display_ctl(MENU_DISPLAY_CTL_SET_VIEWPORT, NULL);
xmb_draw_ribbon(xmb, draw); xmb_draw_ribbon(draw);
menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL); menu_display_ctl(MENU_DISPLAY_CTL_BLEND_END, NULL);
} }
@ -2048,7 +2037,7 @@ static void xmb_frame(void *data)
&& !draw.force_transparency && draw.texture) && !draw.force_transparency && draw.texture)
draw.color = &coord_color2[0]; draw.color = &coord_color2[0];
xmb_draw_bg(xmb, &draw); xmb_draw_bg(&draw);
xmb_draw_text(xmb, xmb_draw_text(xmb,
xmb->title_name, xmb->margins.title.left, xmb->title_name, xmb->margins.title.left,
@ -2187,7 +2176,7 @@ static void xmb_frame(void *data)
&& !draw.force_transparency && draw.texture) && !draw.force_transparency && draw.texture)
draw.color = &coord_color2[0]; draw.color = &coord_color2[0];
xmb_draw_bg(xmb, &draw); xmb_draw_bg(&draw);
xmb_render_messagebox_internal(xmb, msg); xmb_render_messagebox_internal(xmb, msg);
} }

View File

@ -503,6 +503,12 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
const float *new_vertex = NULL; const float *new_vertex = NULL;
const float *new_tex_coord = NULL; const float *new_tex_coord = NULL;
menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data; menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data;
float bg[16] = {
1, 0, 0.1, 1,
1, 0.1, 0, 1,
0.05, 0, 0.05, 1,
0.05, 0, 0.05, 1
};
if (!menu_disp || !draw) if (!menu_disp || !draw)
return false; return false;
@ -519,7 +525,7 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data)
coords.vertex = new_vertex; coords.vertex = new_vertex;
coords.tex_coord = new_tex_coord; coords.tex_coord = new_tex_coord;
coords.lut_tex_coord = new_tex_coord; coords.lut_tex_coord = new_tex_coord;
coords.color = (const float*)draw->color; coords.color = bg;
draw->x = 0; draw->x = 0;
draw->y = 0; draw->y = 0;