diff options
| author | Leo Lam <leolino.lam@gmail.com> | 2017-09-15 19:30:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-15 19:30:05 +0200 |
| commit | 7cb8d6612c6df51073037b56ebc866f180aecd71 (patch) | |
| tree | 634e4c4d34472c6f2e49fbd48bebb6bb5f82de63 /Source/Core/DiscIO/FileSystemGCWii.cpp | |
| parent | 7caf44c8b5a8a435ad1d9db3b2444db614d329eb (diff) | |
| parent | f294599e734f2391db9e74b6454752e75fdf368c (diff) | |
Merge pull request #5870 from JosJuice/lazy-filesystem
DiscIO: Use Common::Lazy more
Diffstat (limited to 'Source/Core/DiscIO/FileSystemGCWii.cpp')
| -rw-r--r-- | Source/Core/DiscIO/FileSystemGCWii.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/DiscIO/FileSystemGCWii.cpp b/Source/Core/DiscIO/FileSystemGCWii.cpp index 55afc907c9..e243d0ec72 100644 --- a/Source/Core/DiscIO/FileSystemGCWii.cpp +++ b/Source/Core/DiscIO/FileSystemGCWii.cpp @@ -185,19 +185,19 @@ bool FileInfoGCWii::IsValid(u64 fst_size, const FileInfoGCWii& parent_directory) } FileSystemGCWii::FileSystemGCWii(const Volume* volume, const Partition& partition) - : FileSystem(volume, partition), m_valid(false), m_root(nullptr, 0, 0, 0) + : m_valid(false), m_root(nullptr, 0, 0, 0) { u8 offset_shift; // Check if this is a GameCube or Wii disc - if (m_volume->ReadSwapped<u32>(0x18, m_partition) == u32(0x5D1C9EA3)) + if (volume->ReadSwapped<u32>(0x18, partition) == u32(0x5D1C9EA3)) offset_shift = 2; // Wii file system - else if (m_volume->ReadSwapped<u32>(0x1c, m_partition) == u32(0xC2339F3D)) + else if (volume->ReadSwapped<u32>(0x1c, partition) == u32(0xC2339F3D)) offset_shift = 0; // GameCube file system else return; // Invalid partition (maybe someone removed its data but not its partition table entry) - const std::optional<u64> fst_offset = GetFSTOffset(*m_volume, m_partition); - const std::optional<u64> fst_size = GetFSTSize(*m_volume, m_partition); + const std::optional<u64> fst_offset = GetFSTOffset(*volume, partition); + const std::optional<u64> fst_size = GetFSTSize(*volume, partition); if (!fst_offset || !fst_size) return; if (*fst_size < FST_ENTRY_SIZE) @@ -220,7 +220,7 @@ FileSystemGCWii::FileSystemGCWii(const Volume* volume, const Partition& partitio // Read the whole FST m_file_system_table.resize(*fst_size); - if (!m_volume->Read(*fst_offset, *fst_size, m_file_system_table.data(), m_partition)) + if (!volume->Read(*fst_offset, *fst_size, m_file_system_table.data(), partition)) { ERROR_LOG(DISCIO, "Couldn't read file system table"); return; |
