[Feature] Open plugins now recognizes known filetypes and can run them

now you can run your lua files without having to add the viewer to
the shortcut or if you want a bmp file to be displayed when you start
the device that can be done as well

Change-Id: Ia56b566789623a2ca78d9e4583086db6e2cd689b
This commit is contained in:
William Wilgus 2024-05-06 16:39:57 -04:00
parent 30482bd908
commit ee840709d3
8 changed files with 49 additions and 20 deletions

View file

@ -604,9 +604,9 @@ int filetype_get_icon(int attr)
return filetypes[index].icon;
}
char* filetype_get_plugin(const struct entry* file, char *buffer, size_t buffer_len)
char* filetype_get_plugin(int attr, char *buffer, size_t buffer_len)
{
int index = find_attr(file->attr);
int index = find_attr(attr);
if (index < 0 || !buffer)
return NULL;
struct file_type *ft_indexed = &filetypes[index];