GFX/DISPLAY: Restore static on gfx_display_draw_bg coords

The struct's address is stored in the caller's draw struct and
read after gfx_display_draw_bg returns, so the storage must
outlive the call. Making it a plain stack local produced a
dangling pointer, breaking wallpaper and pipeline background
rendering in xmb_frame.

The original thread-safety concern from 0abe6dc stands, but the
correct fix is for callers to own the video_coords struct and
pass it in — a larger refactor. Restoring static as an interim
fix.
This commit is contained in:
U-DESKTOP-SPFP6AQ\twistedtechre committed 2026-04-16 15:15:24 +02:00
1 parent 691d934785
commit 904c3848b3
1 file changed
+1 -1
+1 -1
View File
@@ -461,7 +461,7 @@ void gfx_display_draw_bg(
void *userdata, bool add_opacity_to_wallpaper,
float override_opacity)
{
struct video_coords coords;
static struct video_coords coords;
const float *new_vertex = NULL;
const float *new_tex_coord = NULL;
gfx_display_ctx_driver_t *dispctx = p_disp->dispctx;