fixed extra incursions of ROM extension searches

This commit is contained in:
unknown 2015-11-13 22:00:26 -05:00
parent a476d4c36e
commit a061bdb5dc
1 changed files with 10 additions and 3 deletions

View File

@ -567,6 +567,7 @@ void CRomBrowser::AddFileNameToList(strlist & FileList, const stdstr & Directory
stdstr FileName = Directory + Name + Extension;
FileName.ToLower();
FileList.push_back(FileName);
break;
}
}
}
@ -586,8 +587,8 @@ void CRomBrowser::FillRomList(strlist & FileList, const CPath & BaseDirectory, c
do
{
uint8_t ext_ID;
int8_t new_list_entry = 0;
const uint8_t exts = sizeof(ROM_extensions) / sizeof(ROM_extensions[0]);
rom_entry_begin:
//TODO: Fix exception on Windows XP (Visual Studio 2010+)
//WriteTraceF(TraceDebug,__FUNCTION__ ": 2 %s m_StopRefresh = %d",(LPCSTR)SearchPath,m_StopRefresh);
@ -611,11 +612,17 @@ rom_entry_begin:
for (ext_ID = 0; ext_ID < exts; ext_ID++)
{
if (Extension == ROM_extensions[ext_ID] && Extension != "7z")
{
new_list_entry = 1;
break;
}
}
if (new_list_entry)
{
AddRomToList(SearchPath, lpLastRom);
goto rom_entry_begin;
}
continue;
}
if (Extension == "7z")
{
try