Might Fix the Viewer in Windows

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@590 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1 2008-09-20 19:27:23 +00:00
parent 720efb825d
commit d9e4b55f15
2 changed files with 7 additions and 4 deletions

View File

@ -161,6 +161,9 @@ void CFileSystemGCWii::GetStringFromOffset(u64 _Offset, char* Filename) const
size_t CFileSystemGCWii::GetFileList(std::vector<SFileInfo> *_rFilenames)
{
if(_rFilenames == NULL)
return m_FileInfoVector.size();
(*_rFilenames).resize(m_FileInfoVector.size());
for (size_t i = 0; i < m_FileInfoVector.size(); i++)
{

View File

@ -41,12 +41,12 @@ CFilesystemViewer::CFilesystemViewer(const std::string fileName, wxWindow* paren
{
OpenIso = DiscIO::CreateVolumeFromFilename(fileName);
pFileSystem = DiscIO::CreateFileSystem(*OpenIso);
std::vector<DiscIO::SFileInfo> Our_Files;
pFileSystem->GetFileList(&Our_Files);
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 = 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);
}
CFilesystemViewer::~CFilesystemViewer()