Only scan for extensions that apply to the type of games set to show

For me saves between 4-10seconds each refresh when only wads are shown
similar speed ups when only wii games are shown

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3356 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99 2009-06-07 17:22:29 +00:00
parent 9bd36858c6
commit c6abb79e6e
1 changed files with 10 additions and 4 deletions

View File

@ -445,10 +445,16 @@ void CGameListCtrl::ScanForISOs()
} }
CFileSearch::XStringVector Extensions; CFileSearch::XStringVector Extensions;
Extensions.push_back("*.iso");
Extensions.push_back("*.gcm"); if (SConfig::GetInstance().m_ListGC)
Extensions.push_back("*.gcz"); Extensions.push_back("*.gcm");
Extensions.push_back("*.wad"); if (SConfig::GetInstance().m_ListWii || SConfig::GetInstance().m_ListGC)
{
Extensions.push_back("*.iso");
Extensions.push_back("*.gcz");
}
if (SConfig::GetInstance().m_ListWad)
Extensions.push_back("*.wad");
CFileSearch FileSearch(Extensions, Directories); CFileSearch FileSearch(Extensions, Directories);
const CFileSearch::XStringVector& rFilenames = FileSearch.GetFileNames(); const CFileSearch::XStringVector& rFilenames = FileSearch.GetFileNames();