From d22b72a892029e4733a078462d952192b6f8132c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Thu, 21 Apr 2016 03:21:59 +0700 Subject: [PATCH 1/2] (XMB) Ribbon alpha improvements Honor the xmb alpha setting, and the fade in animation. --- menu/menu_display.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/menu/menu_display.c b/menu/menu_display.c index 6fd3883050..5f9ac7294a 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -527,10 +527,13 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data) 1, 0, 0.1, 1, 1, 0.1, 0, 1, 0.05, 0, 0.05, 1, - 0.05, 0, 0.05, 1 + 0.05, 0, 0.05, 1 }; - bg[3] = bg[7] = bg[11] = bg[15] = draw->handle_alpha; + bg[3] = draw->color[3]; + bg[7] = draw->color[7]; + bg[11] = draw->color[11]; + bg[15] = draw->color[15]; draw->color = bg; draw->texture = 0; @@ -550,11 +553,6 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data) menu_display_ctl(MENU_DISPLAY_CTL_COORDS_ARRAY_GET, &ca); - if (menu_display_ctl(MENU_DISPLAY_CTL_LIBRETRO_RUNNING, NULL)) - draw->handle_alpha = 0.75; - else - draw->handle_alpha = 0.90; - menu_display_ctl(MENU_DISPLAY_CTL_DRAW_GRADIENT, draw); draw->x = 0; From 033ccf4803ea4f6369e1733176ad07504336d962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Thu, 21 Apr 2016 03:36:35 +0700 Subject: [PATCH 2/2] (XMB) Remove dont_replace_coords --- menu/menu_display.c | 3 +-- menu/menu_display.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/menu/menu_display.c b/menu/menu_display.c index 5f9ac7294a..ff61bfbd93 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -509,8 +509,7 @@ bool menu_display_ctl(enum menu_display_ctl_state state, void *data) coords.lut_tex_coord = new_tex_coord; coords.color = (const float*)draw->color; - if (!draw->dont_replace_coords) - draw->coords = &coords; + draw->coords = &coords; if (!draw->texture) draw->texture = menu_display_white_texture; diff --git a/menu/menu_display.h b/menu/menu_display.h index 3d47195247..368c0fd490 100644 --- a/menu/menu_display.h +++ b/menu/menu_display.h @@ -113,7 +113,6 @@ typedef struct menu_display_ctx_draw float y; unsigned width; unsigned height; - bool dont_replace_coords; struct gfx_coords *coords; void *matrix_data; uintptr_t texture;