1
0
Fork 0
forked from len0rd/rockbox

[Bugfix] open_plugin_browse() not showing plugins

rockbox_browse() overrides the desired dirfilter with
global_settings.dirfilter if you aren't using one of the
SHOW_ modes > NUM_FILTER_MODES (which come with their own sideeffects)

add flag BROWSE_DIRFILTER to
override global_settings.dirfilter with browse_context.dirfilter

add ability to set tc->browse to NULL to exit dirbrowse immediately

Change-Id: I2f40d394f9dc0864b2041293eda219f7436a7bf0
This commit is contained in:
William Wilgus 2023-03-18 03:28:12 -04:00
parent b6d04d1ac0
commit 0c29d1788e
3 changed files with 24 additions and 5 deletions

View file

@ -652,7 +652,7 @@ static int dirbrowse(void)
return GO_TO_PREVIOUS; /* No files found for rockbox_browse() */
}
while(1) {
while(tc.browse) {
bool restore = false;
if (tc.dirlevel < 0)
tc.dirlevel = 0; /* shouldnt be needed.. this code needs work! */
@ -1018,7 +1018,7 @@ int rockbox_browse(struct browse_context *browse)
}
else
{
if (dirfilter != SHOW_ID3DB)
if (dirfilter != SHOW_ID3DB && (browse->flags & BROWSE_DIRFILTER) == 0)
tc.dirfilter = &global_settings.dirfilter;
tc.browse = browse;
strmemccpy(current, browse->root, MAX_PATH);