summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2015-07-28 16:56:25 +0200
committerJosJuice <josjuice@gmail.com>2017-06-13 22:37:43 +0200
commit5021b4a567fad9a258f2b0fc397912f499e4cb1d (patch)
treeaa06f212fde2bb9bfdcdd6fb8f771da8709ac324 /Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp
parent95bc57cff3f81f98b172d20a20b503a332fa2603 (diff)
Filesystem: Replace FileInfo struct with interface
GC/Wii filesystem internals shouldn't be exposed to other classes. This change isn't especially useful by itself, but it opens up the way for some neat stuff in the following commits.
Diffstat (limited to 'Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp')
-rw-r--r--Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp b/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp
index 955c5bae50..4b1f5d330a 100644
--- a/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp
+++ b/Source/Core/DolphinWX/ISOProperties/FilesystemPanel.cpp
@@ -23,6 +23,8 @@
#include "Common/Logging/Log.h"
#include "DiscIO/Enums.h"
#include "DiscIO/Filesystem.h"
+// TODO: eww
+#include "DiscIO/FileSystemGCWii.h"
#include "DiscIO/Volume.h"
#include "DolphinWX/ISOFile.h"
#include "DolphinWX/WxUtils.h"
@@ -84,14 +86,14 @@ wxImageList* LoadIconBitmaps(const wxWindow* context)
}
size_t CreateDirectoryTree(wxTreeCtrl* tree_ctrl, wxTreeItemId parent,
- const std::vector<DiscIO::FileInfo>& file_infos,
+ const std::vector<DiscIO::FileInfoGCWii>& file_infos,
const size_t first_index, const size_t last_index)
{
size_t current_index = first_index;
while (current_index < last_index)
{
- const DiscIO::FileInfo& file_info = file_infos[current_index];
+ const DiscIO::FileInfoGCWii& file_info = file_infos[current_index];
std::string file_path = file_info.m_FullPath;
// Trim the trailing '/' if it exists.
@@ -113,7 +115,7 @@ size_t CreateDirectoryTree(wxTreeCtrl* tree_ctrl, wxTreeItemId parent,
{
const wxTreeItemId item = tree_ctrl->AppendItem(parent, StrToWxStr(file_path), ICON_FOLDER);
current_index = CreateDirectoryTree(tree_ctrl, item, file_infos, current_index + 1,
- static_cast<size_t>(file_info.m_FileSize));
+ static_cast<size_t>(file_info.GetSize()));
}
else
{
@@ -126,12 +128,12 @@ size_t CreateDirectoryTree(wxTreeCtrl* tree_ctrl, wxTreeItemId parent,
}
size_t CreateDirectoryTree(wxTreeCtrl* tree_ctrl, wxTreeItemId parent,
- const std::vector<DiscIO::FileInfo>& file_infos)
+ const std::vector<DiscIO::FileInfoGCWii>& file_infos)
{
if (file_infos.empty())
return 0;
- return CreateDirectoryTree(tree_ctrl, parent, file_infos, 1, file_infos.at(0).m_FileSize);
+ return CreateDirectoryTree(tree_ctrl, parent, file_infos, 1, file_infos.at(0).GetSize());
}
WiiPartition* FindWiiPartition(wxTreeCtrl* tree_ctrl, const wxString& label)
@@ -452,7 +454,7 @@ void FilesystemPanel::ExtractDirectories(const std::string& full_path,
const std::string& output_folder,
DiscIO::FileSystem* filesystem)
{
- const std::vector<DiscIO::FileInfo>& fst = filesystem->GetFileList();
+ const std::vector<DiscIO::FileInfoGCWii>& fst = filesystem->GetFileList();
u32 index = 0;
u32 size = 0;
@@ -473,7 +475,7 @@ void FilesystemPanel::ExtractDirectories(const std::string& full_path,
if (fst[index].m_FullPath == full_path)
{
INFO_LOG(DISCIO, "Found the directory at %u", index);
- size = static_cast<u32>(fst[index].m_FileSize);
+ size = static_cast<u32>(fst[index].GetSize());
break;
}
}