fix saves issue

This commit is contained in:
dborth 2010-07-15 06:55:30 +00:00
parent e965719645
commit f34ef9e1c6
3 changed files with 8 additions and 5 deletions

View File

@ -56,6 +56,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;
@ -525,7 +526,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
@ -678,7 +680,8 @@ ParseDirectory(bool waitParse)
if(waitParse) // wait for complete parsing
{
ShowAction("Loading...");
ShowAction("Loading...");
while(!LWP_ThreadIsSuspended(parsethread))
usleep(THREAD_SLEEP);

View File

@ -32,7 +32,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);

View File

@ -1616,7 +1616,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(romFilename);