FileSystem: Fixed SOME memory leaks, cleaned up code and fixed empty entry bug.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@596 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
XTra.KrazzY
2008-09-21 14:51:40 +00:00
parent de577e521f
commit 60a4630324
4 changed files with 49 additions and 33 deletions

View File

@ -39,14 +39,15 @@ DiscIO::IFileSystem* pFileSystem = NULL;
CFilesystemViewer::CFilesystemViewer(const std::string fileName, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
: wxDialog(parent, id, title, position, size, style)
{
std::vector<DiscIO::SFileInfo *> Our_Files;
OpenIso = DiscIO::CreateVolumeFromFilename(fileName);
pFileSystem = DiscIO::CreateFileSystem(*OpenIso);
std::vector<DiscIO::SFileInfo> *Our_Files = new std::vector<DiscIO::SFileInfo>[pFileSystem->GetFileList(NULL)];
pFileSystem->GetFileList(Our_Files);
CreateGUIControls();
for(u32 a = 0;a < Our_Files->size();++a)
m_Treectrl->AppendItem(RootId, wxString::FromAscii((*Our_Files)[a].m_FullPath));//printf("%d dir? %s '%s'\n", a, Our_Files[a].IsDirectory() ? "True" : "False", Our_Files[a].m_FullPath);
for(u32 a = 1; a < Our_Files.size(); ++a)
m_Treectrl->AppendItem(RootId, wxString::FromAscii(Our_Files[a]->m_FullPath));//printf("%d dir? %s '%s'\n", a, Our_Files[a].IsDirectory() ? "True" : "False", Our_Files[a].m_FullPath);
}
CFilesystemViewer::~CFilesystemViewer()