From b6a69effda78d641362781add445ce3685f516ea Mon Sep 17 00:00:00 2001 From: yabause Date: Fri, 17 Nov 2006 21:33:59 +0000 Subject: [PATCH] Fixed the fix that didn't fixed cflash... but it's still not working right... Added some #include in SPU --- trunk/desmume/src/SPU.c | 3 +++ trunk/desmume/src/cflash.c | 13 ++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/trunk/desmume/src/SPU.c b/trunk/desmume/src/SPU.c index 2d457a0b3..d2aeb6a01 100644 --- a/trunk/desmume/src/SPU.c +++ b/trunk/desmume/src/SPU.c @@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include +#include + #include "debug.h" #include "ARM9.h" #include "MMU.h" diff --git a/trunk/desmume/src/cflash.c b/trunk/desmume/src/cflash.c index b5c35a4fc..f0dca1148 100644 --- a/trunk/desmume/src/cflash.c +++ b/trunk/desmume/src/cflash.c @@ -181,18 +181,17 @@ void add_file(char *fname, FsEntry * entry, int fileLevel) { /* List all files and subdirectories recursively */ -void list_files(char *fpath, int fileLevel) { +void list_files(char *fpath) { void * hFind; FsEntry entry; char DirSpec[255 + 1],SubDir[255+1]; u32 dwError; char *fname; int i,j; + int fileLevel; - fileLevel++; - if (fileLevel > maxLevel) { - maxLevel = fileLevel; - } + maxLevel++; + fileLevel = maxLevel; strncpy(DirSpec, fpath, strlen(fpath)+1); @@ -214,7 +213,7 @@ void list_files(char *fpath, int fileLevel) { // FIXME: Unix filenames can start with a . if ((entry.flags & FS_IS_DIR) && (fname[0] != '.')) { sprintf(SubDir, "%s%c%s", fpath, FS_SEPARATOR, fname); - list_files(SubDir, fileLevel); + list_files(SubDir); } } @@ -263,7 +262,7 @@ BOOL cflash_build_fat() { numExtraEntries[i] = 0; } - list_files(sRomPath, fileLevel); + list_files(sRomPath); k = 0; clusterNum = rootCluster = (SECRESV + SECPERFAT)/SECPERCLUS;