From c6abb79e6eb552ec5ad972bf897ba17d19f2513f Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Sun, 7 Jun 2009 17:22:29 +0000 Subject: [PATCH] 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 --- Source/Core/DolphinWX/Src/GameListCtrl.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index e11bbc3bef..aec0c72594 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -445,10 +445,16 @@ void CGameListCtrl::ScanForISOs() } CFileSearch::XStringVector Extensions; - Extensions.push_back("*.iso"); - Extensions.push_back("*.gcm"); - Extensions.push_back("*.gcz"); - Extensions.push_back("*.wad"); + + if (SConfig::GetInstance().m_ListGC) + Extensions.push_back("*.gcm"); + 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); const CFileSearch::XStringVector& rFilenames = FileSearch.GetFileNames();