mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-12-24 18:21:50 +01:00
fix saves issue
This commit is contained in:
parent
ee2277f76f
commit
d6cfb51b59
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user