Skip to content

Commit 2ef44bd

Browse files
committed
(Menu/XMB) No more drawing inconsistent content, draw the
gradient instead when we context reset and have a 2 frame window
1 parent ea98c86 commit 2ef44bd

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

menu/drivers/xmb.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8362,6 +8362,19 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
83628362
coord_black,
83638363
coord_white);
83648364

8365+
/* Visual consistency during deferred context reset:
8366+
* xmb_render() set pending_context_reset on a scale-factor /
8367+
* layout change; the actual reset (which rebuilds icon_size,
8368+
* margins, fonts and textures at the new scale) won't fire
8369+
* until the counter reaches 0 — see the comment in xmb_render().
8370+
* In the interim frames, layout values and asset sizes are
8371+
* mismatched, which produces a visible flash. Skip everything
8372+
* past the background quad (icons, text, ribbon-overlay items,
8373+
* cursor, message box) until the reset completes; the gradient
8374+
* we just drew is the entire frame for those 1-2 frames. */
8375+
if (xmb->pending_context_reset > 0)
8376+
goto ctx_destroyed;
8377+
83658378
selection = menu_st->selection_ptr;
83668379

83678380
if (!p_disp->dispctx->handles_transform)

0 commit comments

Comments
 (0)