Skip to content

Commit 9fc16b6

Browse files
committed
If ozone_render() hasn't run yet (which is the case at
startup when settings->uints.menu_startup_page != Main Menu — the runloop's PENDING_STARTUP_PAGE branch handles the list swap and doesn't fall through to menu_driver_iterate()), NEED_COMPUTE is still set and entry node positions are uninitialised. Drawing entries at this point produces every entry overlapping at the header offset. Compute them inline now so the very first frame renders correctly
1 parent cadb848 commit 9fc16b6

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

menu/drivers/ozone.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11961,6 +11961,24 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
1196111961
ozone->cursor_x_old = ozone->pointer.x;
1196211962
ozone->cursor_y_old = ozone->pointer.y;
1196311963
ozone->flags &= ~OZONE_FLAG_FIRST_FRAME;
11964+
11965+
/* If ozone_render() hasn't run yet (which is the case at
11966+
* startup when settings->uints.menu_startup_page != Main Menu —
11967+
* the runloop's PENDING_STARTUP_PAGE branch handles the list
11968+
* swap and doesn't fall through to menu_driver_iterate()),
11969+
* NEED_COMPUTE is still set and entry node positions are
11970+
* uninitialised. Drawing entries at this point produces
11971+
* every entry overlapping at the header offset. Compute
11972+
* them inline now so the very first frame renders correctly. */
11973+
if (ozone->flags & OZONE_FLAG_NEED_COMPUTE)
11974+
{
11975+
file_list_t *fl_compute = MENU_LIST_GET_SELECTION(menu_list, 0);
11976+
ozone_compute_entries_position(ozone,
11977+
settings->bools.savestate_thumbnail_enable,
11978+
settings->bools.menu_show_sublabels,
11979+
fl_compute ? fl_compute->size : 0);
11980+
ozone->flags &= ~OZONE_FLAG_NEED_COMPUTE;
11981+
}
1196411982
}
1196511983

1196611984
/* OSK Fade detection */

0 commit comments

Comments
 (0)