From 12deb9a0c7e52c25de87aeca8de01c7c94e16138 Mon Sep 17 00:00:00 2001 From: Maximilian Rehkopf Date: Sun, 10 Jun 2012 20:28:33 +0200 Subject: [PATCH] firmware: correct number of files/dirs in system information --- src/filetypes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filetypes.c b/src/filetypes.c index c398cb4..de0d1bb 100644 --- a/src/filetypes.c +++ b/src/filetypes.c @@ -93,7 +93,6 @@ uint32_t scan_dir(char* path, FILINFO* fno_param, char mkdb, uint32_t this_dir_t numentries=0; for(pass = 0; pass < 2; pass++) { if(pass) { - num_dirs_total++; dirsize = 4*(numentries); next_subdir_tgt += dirsize + 4; if(parent_tgt) next_subdir_tgt += 4; @@ -102,6 +101,7 @@ uint32_t scan_dir(char* path, FILINFO* fno_param, char mkdb, uint32_t this_dir_t } DBG_FS printf("path=%s depth=%d ptr=%lx entries=%d parent=%lx next subdir @%lx\n", path, depth, db_tgt, numentries, parent_tgt, next_subdir_tgt); if(mkdb) { + num_dirs_total++; // printf("d=%d Saving %lx to Address %lx [end]\n", depth, 0L, next_subdir_tgt - 4); sram_writelong(0L, next_subdir_tgt - 4); } @@ -183,10 +183,10 @@ uint32_t scan_dir(char* path, FILINFO* fno_param, char mkdb, uint32_t this_dir_t } else { SNES_FTYPE type = determine_filetype((char*)fn); if(type != TYPE_UNKNOWN) { - num_files_total++; numentries++; if(pass) { if(mkdb) { + num_files_total++; /* snes_romprops_t romprops; */ path[len]='/'; strncpy(path+len+1, (char*)fn, sizeof(fs_path)-len);