diff --git a/source/fileop.cpp b/source/fileop.cpp index 8f2f034..f330528 100644 --- a/source/fileop.cpp +++ b/source/fileop.cpp @@ -57,6 +57,7 @@ bool isMounted[7] = { false, false, false, false, false, false, false }; static lwp_t parsethread = LWP_THREAD_NULL; static DIR_ITER * dirIter = NULL; static bool parseHalt = true; +static bool parseFilter = true; bool ParseDirEntries(); int selectLoadedFile = 0; @@ -526,7 +527,7 @@ bool ParseDirEntries() ext = GetExt(filename); // don't show the file if it's not a valid ROM - if((filestat.st_mode & _IFDIR) == 0) + if(parseFilter && (filestat.st_mode & _IFDIR) == 0) { if(ext == NULL) continue; @@ -615,10 +616,11 @@ bool ParseDirEntries() * Browse subdirectories **************************************************************************/ int -ParseDirectory(bool waitParse) +ParseDirectory(bool waitParse, bool filter) { int retry = 1; bool mounted = false; + parseFilter = filter; ResetBrowser(); // reset browser @@ -680,7 +682,8 @@ ParseDirectory(bool waitParse) if(waitParse) // wait for complete parsing { - ShowAction("Loading..."); + ShowAction("Loading..."); + while(!LWP_ThreadIsSuspended(parsethread)) usleep(THREAD_SLEEP); diff --git a/source/fileop.h b/source/fileop.h index d737dcb..58c9310 100644 --- a/source/fileop.h +++ b/source/fileop.h @@ -34,7 +34,7 @@ char * StripDevice(char * path); bool ChangeInterface(int device, bool silent); bool ChangeInterface(char * filepath, bool silent); void CreateAppPath(char * origpath); -int ParseDirectory(bool waitParse = false); +int ParseDirectory(bool waitParse = false, bool filter = true); void AllocSaveBuffer(); void FreeSaveBuffer(); size_t LoadFile(char * rbuffer, char *filepath, size_t length, bool silent); diff --git a/source/menu.cpp b/source/menu.cpp index 368eb30..f27f38a 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -1603,7 +1603,7 @@ static int MenuGameSaves(int action) memset(&saves, 0, sizeof(saves)); sprintf(browser.dir, "%s%s", pathPrefix[GCSettings.SaveMethod], GCSettings.SaveFolder); - ParseDirectory(true); + ParseDirectory(true, false); len = strlen(Memory.ROMFilename);