mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user