@@ -154,12 +154,13 @@ void updateList(int clearindex)
154154 // Attempt to keep Index
155155 if (!clearindex )
156156 {
157- // Fix Position
158- if ( position > = fileCount ) position = fileCount - 1 ;
157+ if ( position >= fileCount )
158+ position = fileCount - 1 ; // Fix Position
159159 }
160160
161161 // Reset Position
162- else position = 0 ;
162+ else
163+ position = 0 ;
163164}
164165
165166void recursiveFree (File * node )
@@ -224,7 +225,7 @@ void displayFiles()
224225 else
225226 sf2d_draw_texture (settingsIcon , 50 , 1 );
226227
227- if (DEFAULT_STATE == STATE_UPDATE )
228+ /* if (DEFAULT_STATE == STATE_UPDATE)
228229 {
229230 sf2d_draw_texture(s_UpdateIcon, 75, 0);
230231 sftd_draw_text(font, ((320 - (sftd_get_text_width(font, 11, lang_update[language][0]))) / 2), 40, RGBA8(BottomScreen_text_colour.r, BottomScreen_text_colour.g , BottomScreen_text_colour.b, 255), 11, lang_update[language][0]);
@@ -240,7 +241,7 @@ void displayFiles()
240241 wait(300000000);
241242 longjmp(exitJmp, 1);
242243 }
243- else
244+ else*/
244245 sf2d_draw_texture (updateIcon , 75 , 0 );
245246
246247 sf2d_draw_texture (ftpIcon , 100 , 0 );
@@ -397,7 +398,12 @@ void displayFiles()
397398 else
398399 {
399400 getSizeString (size , getFileSize (sdmcArchive , path ));
400- sftd_draw_textf (font2 , 70 , 75 + (38 * printed ), RGBA8 (TopScreen_min_colour .r , TopScreen_min_colour .g , TopScreen_min_colour .b , 255 ), 10 , "%s -rw-rw----" , getFileModifiedTime (path ));
401+
402+ if (file -> isRDONLY )
403+ sftd_draw_textf (font2 , 70 , 75 + (38 * printed ), RGBA8 (TopScreen_min_colour .r , TopScreen_min_colour .g , TopScreen_min_colour .b , 255 ), 10 , "%s -r--r-----" , getFileModifiedTime (path ));
404+ else
405+ sftd_draw_textf (font2 , 70 , 75 + (38 * printed ), RGBA8 (TopScreen_min_colour .r , TopScreen_min_colour .g , TopScreen_min_colour .b , 255 ), 10 , "%s -rw-rw----" , getFileModifiedTime (path ));
406+
401407 sftd_draw_textf (font2 , 395 - sftd_get_text_width (font2 , 10 , size ), 75 + (38 * printed ), RGBA8 (TopScreen_colour .r , TopScreen_colour .g , TopScreen_colour .b , 255 ), 10 , "%s" , size );
402408 }
403409
@@ -441,8 +447,6 @@ void openFile(void)
441447 displayImage (path , 1 );
442448 else if ((strncmp (file -> ext , "gif" , 3 ) == 0 ) || (strncmp (file -> ext , "GIF" , 3 ) == 0 ))
443449 displayImage (path , 2 );
444- else if ((strncmp (file -> ext , "txt" , 3 ) == 0 ) || (strncmp (file -> ext , "TXT" , 3 ) == 0 ))
445- displayText (path );
446450 else if ((strncmp (file -> ext , "cia" , 3 ) == 0 ) || (strncmp (file -> ext , "CIA" , 3 ) == 0 ))
447451 displayCIA (path );
448452 else if ((strncmp (file -> ext , "zip" , 3 ) == 0 ) || (strncmp (file -> ext , "ZIP" , 3 ) == 0 ))
@@ -451,6 +455,8 @@ void openFile(void)
451455 updateList (CLEAR );
452456 displayFiles (CLEAR );
453457 }
458+ /*else if ((strncmp(file->ext, "txt", 3) == 0) || (strncmp(file->ext, "TXT", 3) == 0))
459+ displayText(path);*/
454460}
455461
456462// Navigate to Folder
0 commit comments