summaryrefslogtreecommitdiff
path: root/apps/plugins/imageviewer/imageviewer.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/imageviewer/imageviewer.c')
-rw-r--r--apps/plugins/imageviewer/imageviewer.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/plugins/imageviewer/imageviewer.c b/apps/plugins/imageviewer/imageviewer.c
index 37610b7bf6..6cc2192cb9 100644
--- a/apps/plugins/imageviewer/imageviewer.c
+++ b/apps/plugins/imageviewer/imageviewer.c
@@ -148,8 +148,8 @@ static void get_pic_list(void)
148 148
149 for (i = 0; i < tree->filesindir && buf_size > sizeof(char**); i++) 149 for (i = 0; i < tree->filesindir && buf_size > sizeof(char**); i++)
150 { 150 {
151 if (!(dircache[i].attr & ATTR_DIRECTORY) 151 /* Add all files. Non-image files will be filtered out while loading. */
152 && get_image_type(dircache[i].name) != IMAGE_UNKNOWN) 152 if (!(dircache[i].attr & ATTR_DIRECTORY))
153 { 153 {
154 file_pt[entries] = dircache[i].name; 154 file_pt[entries] = dircache[i].name;
155 /* Set Selected File. */ 155 /* Set Selected File. */
@@ -742,7 +742,13 @@ static int load_and_show(char* filename, struct image_info *info)
742 742
743 rb->lcd_clear_display(); 743 rb->lcd_clear_display();
744 744
745 status = get_image_type(filename); 745 /* suppress warning while running slideshow */
746 status = get_image_type(filename, iv_api.running_slideshow);
747 if (status == IMAGE_UNKNOWN) {
748 /* file isn't supported image file, skip this. */
749 file_pt[curfile] = NULL;
750 return change_filename(direction);
751 }
746 if (image_type != status) /* type of image is changed, load decoder. */ 752 if (image_type != status) /* type of image is changed, load decoder. */
747 { 753 {
748 struct loader_info loader_info = { 754 struct loader_info loader_info = {
@@ -914,7 +920,7 @@ enum plugin_status plugin_start(const void* parameter)
914 if(!parameter) return PLUGIN_ERROR; 920 if(!parameter) return PLUGIN_ERROR;
915 921
916 rb->strcpy(np_file, parameter); 922 rb->strcpy(np_file, parameter);
917 if (get_image_type(np_file) == IMAGE_UNKNOWN) 923 if (get_image_type(np_file, false) == IMAGE_UNKNOWN)
918 { 924 {
919 rb->splash(HZ*2, "Unsupported file"); 925 rb->splash(HZ*2, "Unsupported file");
920 return PLUGIN_ERROR; 926 return PLUGIN_ERROR;