Repository navigation
Conversation
On the Playlists tab, Scan jumps to a random playlist other than the selected one. Each of the four menu drivers drew rows at random until it hit one, so with no other playlist to land on the draw never ended and the menu froze: no playlists at all, or only the selected one. random_range() can also return one past its maximum; the draw then read nothing, kept the previous row's type, and the loop exited with the selection one past the end of the list. One shared helper, menu_playlists_tab_random_selection(), now counts the other playlists and picks one of them; with none it returns the current selection and the driver does nothing. The four copies of the loop are gone. MaterialUI keeps its own navigation_set(..., false). Test: samples/menu/playlists_scan boots the shipping objects headless (null video) per driver and presses Scan with zero, one and two playlists. Before the fix, rgui, ozone, xmb and glui froze with no playlists; with one, the selection went to 5 on a 5-row list. After, all four pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In Ozone's sidebar each playlist is a tab, and Scan jumps to a random playlist tab other than the current one by drawing until it hits one. With one playlist tab, already selected, the draw never ended and the menu froze. With no playlist tabs the draw returned the slot after the last tab, so Scan opened a tab that does not exist; a second Scan from there froze. Scan now counts the other playlist tabs, picks one of them with equal chance, and does nothing when there is none. The scroll sound tested `selection` (the list row) rather than `tab_selection`; it now tests the tab. Test: samples/menu/playlists_scan gains `ozone sidebar<N>` runs with 0, 1 and 2 playlist tabs, entering the sidebar by Left and Up. Red before: sidebar0 moved to a nonexistent playlist tab then froze; sidebar1 froze. Green after: all three, and the four drivers' tab runs. Mutations, each red: no decrement for the current tab (sidebar1 jumps past the end); no skip of the current tab (sidebar2 lands on itself); no "none" check (sidebar0 moves). The zero-tab run starts on the first tab, because from the last system tab the no-check mutation lands back where it started. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milnet01
added a commit
to milnet01/RetroArch
that referenced
this pull request
Oct 23, 2026
…debar Scan freezes) CLAUDE.md rule 14: ROADMAP.md is not a contract document, no gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the Playlists tab, Scan jumps to a random playlist other than the selected one. All four menu drivers did this by drawing random rows until one was a different playlist. With no other playlist to land on, the draw never ended and the menu froze. That happens with no playlists at all, or with only the selected one.
random_range()can also return one past its maximum. The draw then read no row, kept the previous row's type, and the loop exited with the selection one past the end of the list.One shared helper,
menu_playlists_tab_random_selection()inmenu_driver.c, now counts the other playlists and picks one of them with equal chance. With none, it returns the current selection and the driver does nothing. The four copies of the loop are gone. MaterialUI keeps its ownnavigation_set(..., false), as it had.Ozone's sidebar has the same loop for its playlist tabs, fixed in the second commit. With one playlist tab, already selected, the draw never ended. With no playlist tabs, Scan opened a tab that does not exist, and a second Scan from there froze. It now counts the other playlist tabs the same way. Its scroll sound tested the list row rather than the tab; it now tests the tab.
Testing: a new harness,
samples/menu/playlists_scan, links the shipping objects of a--disable-qtbuild with onlymain()replaced, the same way assamples/menu/playlist_nav. It boots each menu driver headless (null video, audio and input) and presses Scan through the driver's own action handler with zero, one and two playlists. On master, all four drivers (rgui, ozone, xmb, glui) fail: Scan never returns with no playlists, and with one playlist the selection moves to index 5 or 6 of a 5-row list (indexes 0 to 4). In Ozone's sidebar on master, one playlist tab freezes and zero tabs moves to a nonexistent tab. With the change, all four drivers and the three sidebar cases (zero, one and two playlist tabs) pass. Full./configure --disable-qt && make -j4builds with no warnings in the touched files.🤖 Generated with Claude Code