mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-08 17:28:49 -10:00
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:
1 parent
691d934785
commit
904c3848b3
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user