mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Undo previous commit. Apparently, this is not wanted behaviour.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6158 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7144e38b5f
commit
6a33dd761e
3 changed files with 9 additions and 16 deletions
|
@ -220,28 +220,21 @@ int filetype_get_attr(const char* name)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fill a menu list with viewers (used in onplay.c) */
|
/* fill a menu list with viewers (used in onplay.c) */
|
||||||
int filetype_load_menu(struct menu_item* menu, int max_items,
|
int filetype_load_menu(struct menu_item* menu,int max_items)
|
||||||
char *filename)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int cnt=0;
|
int cnt=0;
|
||||||
|
|
||||||
for (i=0; i < cnt_exttypes; i++)
|
for (i=0; i < cnt_filetypes; i++)
|
||||||
{
|
{
|
||||||
if(exttypes[i].type->plugin)
|
if (filetypes[i].plugin)
|
||||||
{
|
{
|
||||||
if (strcasecmp(&filename[strlen(filename)-
|
menu[cnt].desc = filetypes[i].plugin;
|
||||||
strlen(exttypes[i].extension)],
|
|
||||||
exttypes[i].extension) == 0)
|
|
||||||
{
|
|
||||||
menu[cnt].desc = exttypes[i].type->plugin;
|
|
||||||
cnt++;
|
cnt++;
|
||||||
if (cnt == max_items)
|
if (cnt == max_items)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return cnt;
|
return cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ int filetype_get_icon(int);
|
||||||
char* filetype_get_plugin(const struct entry*);
|
char* filetype_get_plugin(const struct entry*);
|
||||||
void filetype_init(void);
|
void filetype_init(void);
|
||||||
bool filetype_supported(int);
|
bool filetype_supported(int);
|
||||||
int filetype_load_menu(struct menu_item*, int, char*);
|
int filetype_load_menu(struct menu_item*, int);
|
||||||
int filetype_load_plugin(const char*, char*);
|
int filetype_load_plugin(const char*, char*);
|
||||||
|
|
||||||
struct file_type {
|
struct file_type {
|
||||||
|
|
|
@ -56,7 +56,7 @@ static bool list_viewers(void)
|
||||||
int m, i, result;
|
int m, i, result;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
i=filetype_load_menu(menu,sizeof(menu)/sizeof(*menu),selected_file);
|
i=filetype_load_menu(menu,sizeof(menu)/sizeof(*menu));
|
||||||
if (i)
|
if (i)
|
||||||
{
|
{
|
||||||
m = menu_init( menu, i, NULL, NULL, NULL, NULL );
|
m = menu_init( menu, i, NULL, NULL, NULL, NULL );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue