From 54482f5d1ca33bd1add56baa84048a88f68ad0d4 Mon Sep 17 00:00:00 2001 From: Joel16 Date: Sat, 26 May 2018 09:57:33 -0500 Subject: [PATCH] Fix image viewer (works with png only for now) --- source/dirbrowse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/dirbrowse.c b/source/dirbrowse.c index c2e1591..8a803c9 100644 --- a/source/dirbrowse.c +++ b/source/dirbrowse.c @@ -223,12 +223,10 @@ void Dirbrowse_OpenFile(void) if (R_SUCCEEDED(Dirbrowse_Navigate(0))) { Dirbrowse_SaveLastDirectory(); - Dirbrowse_PopulateFiles(true); - //Dirbrowse_DisplayFiles(); } } - else if ((strncasecmp(file->ext, "png", 3) == 0) || (strncasecmp(file->ext, "jpg", 3) == 0)) + else if ((strncasecmp(FS_GetFileExt(file->name), "png", 3) == 0) || (strncasecmp(FS_GetFileExt(file->name), "jpg", 3) == 0)) Gallery_DisplayImage(path); /*else if (Music_GetMusicFileType(path) != 0) Music_Player(path);