Skip to content

Commit 51902c0

Browse files
committed
gl1: honour xmb_shadows_enable
Same fix as 709d462 for GDI. gl1 was clobbering xmb_shadows_enable alongside menu_shader_pipeline. The latter is correct -- gl1 fixed-function has no programmable pipeline, so the animated XMB backgrounds (Ribbon / Snow / Bokeh / etc.) can't run. But shadow draws are just vertex-color-modulated textured quads: the default GL_MODULATE texture environment with vertex color (0,0,0,a) plus glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) darkens the destination to dst*(1-a), and the gl1 raster font driver's drop_x/drop_y path handles text shadows the same way.
1 parent 709d462 commit 51902c0

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

gfx/drivers/gl1.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,8 +1641,18 @@ static bool gl1_frame(void *data, const void *frame,
16411641
&video_info->osd_stat_params;
16421642
bool overlay_behind_menu = video_info->overlay_behind_menu;
16431643

1644-
/* FIXME: Force these settings off as they interfere with the rendering */
1645-
video_info->xmb_shadows_enable = false;
1644+
/* gl1 fixed-function has no programmable pipeline, so the
1645+
* animated XMB backgrounds (Ribbon / Snow / Bokeh / etc.) can't
1646+
* run -- force that off so XMB falls back to the static gradient.
1647+
*
1648+
* xmb_shadows_enable, on the other hand, is just "draw the icon
1649+
* and text once at +offset with a black tint, then once more on
1650+
* top". The default GL_MODULATE texture environment with vertex
1651+
* color (0,0,0,a) plus glBlendFunc(GL_SRC_ALPHA,
1652+
* GL_ONE_MINUS_SRC_ALPHA) darkens the destination to dst*(1-a),
1653+
* and the gl1 raster font driver's drop_x/drop_y path handles
1654+
* text shadows the same way, so this flag is honoured rather
1655+
* than clobbered. */
16461656
video_info->menu_shader_pipeline = 0;
16471657

16481658
if (gl1->flags & GL1_FLAG_SHOULD_RESIZE)

0 commit comments

Comments
 (0)