1
0
Fork 0
forked from len0rd/rockbox

Allow first level folders in plugin menu

add sorting directories as files
move picross files to a hidden folder

use directory for lua_scripts, sgt_puzzles

make plugin browser able to handle 1st level directories

Change-Id: I30852d71dc992c378d5790756e94f06f5a2e9bef
This commit is contained in:
William Wilgus 2024-05-04 08:41:16 -04:00
parent efcea66280
commit d7c541742f
14 changed files with 1079 additions and 58 deletions

View file

@ -466,6 +466,13 @@ static int update_dir(void)
icon = tc.browse->icon;
if (icon == NOICON)
icon = filetype_get_icon(ATTR_DIRECTORY);
/* display sub directories in the title of plugin browser */
if (tc.dirlevel > 0 && *tc.dirfilter == SHOW_PLUGINS)
{
char *subdir = strrchr(tc.currdir, '/');
if (subdir)
title = subdir + 1; /* step past the separator */
}
}
else
{
@ -1056,7 +1063,7 @@ int rockbox_browse(struct browse_context *browse)
int last_context;
/* don't reset if its the same browse already loaded */
if (tc.browse != browse ||
!(tc.currdir[1] && strcmp(tc.currdir, browse->root) == 0))
!(tc.currdir[1] && strstr(tc.currdir, browse->root) != NULL))
{
tc.browse = browse;
tc.selected_item = 0;