updates to the GameListCtrl add the option to purge the cache, and change iswii to platform (gcm, wii iso, wad)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3334 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99
2009-06-06 07:36:22 +00:00
parent 7e0568d7ba
commit 33a20fe564
6 changed files with 59 additions and 28 deletions

View File

@ -52,6 +52,7 @@ Core::GetWindowHandle().
#include "Common.h" // Common
#include "FileUtil.h"
#include "FileSearch.h"
#include "Timer.h"
#include "Setup.h"
@ -199,6 +200,8 @@ void CFrame::CreateMenu()
viewMenu->AppendCheckItem(IDM_LISTDRIVES, _T("Show Drives"));
viewMenu->Check(IDM_LISTDRIVES, SConfig::GetInstance().m_ListDrives);
#endif
viewMenu->AppendSeparator();
viewMenu->Append(IDM_PURGECACHE, _T("Purge ISO Cache"));
menuBar->Append(viewMenu, _T("&View"));
// Help menu
@ -893,6 +896,20 @@ void CFrame::GameListChanged(wxCommandEvent& event)
case IDM_LISTDRIVES:
SConfig::GetInstance().m_ListDrives = event.IsChecked();
break;
case IDM_PURGECACHE:
CFileSearch::XStringVector Directories;
Directories.push_back(FULL_CACHE_DIR);
CFileSearch::XStringVector Extensions;
Extensions.push_back("*.cache");
CFileSearch FileSearch(Extensions, Directories);
const CFileSearch::XStringVector& rFilenames = FileSearch.GetFileNames();
for (u32 i = 0; i < rFilenames.size(); i++)
{
File::Delete(rFilenames[i].c_str());
}
break;
}
if (m_GameListCtrl)