mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
gfx_widgets_draw_regular_msg - optimization - only set alpha colors
again if alpha hasn't already been applied
This commit is contained in:
parent
2594bd2cf6
commit
cd469d3fb2
@ -1277,11 +1277,16 @@ static void gfx_widgets_draw_regular_msg(
|
||||
unsigned text_color;
|
||||
uintptr_t icon = p_dispwidget->gfx_widgets_icons_textures[
|
||||
MENU_WIDGETS_ICON_INFO]; /* TODO: Real icon logic here */
|
||||
static float last_alpha = 0.0f;
|
||||
|
||||
/* Icon */
|
||||
gfx_display_set_alpha(msg_queue_info, msg->alpha);
|
||||
gfx_display_set_alpha(gfx_widgets_pure_white, msg->alpha);
|
||||
gfx_display_set_alpha(msg_queue_background, msg->alpha);
|
||||
if (last_alpha != msg->alpha)
|
||||
{
|
||||
/* Icon */
|
||||
gfx_display_set_alpha(msg_queue_info, msg->alpha);
|
||||
gfx_display_set_alpha(gfx_widgets_pure_white, msg->alpha);
|
||||
gfx_display_set_alpha(msg_queue_background, msg->alpha);
|
||||
last_alpha = msg->alpha;
|
||||
}
|
||||
|
||||
if (!msg->unfolded || msg->unfolding)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user