summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/DiscScrubber.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2015-10-17 20:52:26 +0200
committerJosJuice <josjuice@gmail.com>2015-10-17 20:52:26 +0200
commit618ccf6109076f5a88bd1fb9aff188de0884ff68 (patch)
treef246110ab5f36c1463f1b511aec9c0aa2695bf8b /Source/Core/DiscIO/DiscScrubber.cpp
parent05e339a605be5f5ccd0f710af774fa08eadd65a2 (diff)
Remove DiscScrubber::GetDOLSize in favor of IFileSystem::GetBootDOLSize
IFileSystem::GetBootDOLSize acts the same. The only difference is that it reads the DOL offset on its own, but this change makes that optional.
Diffstat (limited to 'Source/Core/DiscIO/DiscScrubber.cpp')
-rw-r--r--Source/Core/DiscIO/DiscScrubber.cpp28
1 files changed, 1 insertions, 27 deletions
diff --git a/Source/Core/DiscIO/DiscScrubber.cpp b/Source/Core/DiscIO/DiscScrubber.cpp
index e669a5f4b3..938b0d04eb 100644
--- a/Source/Core/DiscIO/DiscScrubber.cpp
+++ b/Source/Core/DiscIO/DiscScrubber.cpp
@@ -78,7 +78,6 @@ void ReadFromVolume(u64 _Offset, u64 _Length, u32& _Buffer, bool _Decrypt);
void ReadFromVolume(u64 _Offset, u64 _Length, u64& _Buffer, bool _Decrypt);
bool ParseDisc();
bool ParsePartitionData(SPartition& _rPartition);
-u32 GetDOLSize(u64 _DOLOffset);
bool SetupScrub(const std::string& filename, int block_size)
@@ -294,7 +293,7 @@ bool ParsePartitionData(SPartition& _rPartition)
// DOL
ReadFromVolume(0x420, 4, _rPartition.Header.DOLOffset, true);
- _rPartition.Header.DOLSize = GetDOLSize(_rPartition.Header.DOLOffset);
+ _rPartition.Header.DOLSize = filesystem->GetBootDOLSize(_rPartition.Header.DOLOffset);
MarkAsUsedE(_rPartition.Offset
+ _rPartition.Header.DataOffset
, _rPartition.Header.DOLOffset
@@ -327,31 +326,6 @@ bool ParsePartitionData(SPartition& _rPartition)
return ParsedOK;
}
-u32 GetDOLSize(u64 _DOLOffset)
-{
- u32 offset = 0, size = 0, max = 0;
-
- // Iterate through the 7 code segments
- for (u8 i = 0; i < 7; i++)
- {
- ReadFromVolume(_DOLOffset + 0x00 + i * 4, 4, offset, true);
- ReadFromVolume(_DOLOffset + 0x90 + i * 4, 4, size, true);
- if (offset + size > max)
- max = offset + size;
- }
-
- // Iterate through the 11 data segments
- for (u8 i = 0; i < 11; i++)
- {
- ReadFromVolume(_DOLOffset + 0x1c + i * 4, 4, offset, true);
- ReadFromVolume(_DOLOffset + 0xac + i * 4, 4, size, true);
- if (offset + size > max)
- max = offset + size;
- }
-
- return max;
-}
-
} // namespace DiscScrubber
} // namespace DiscIO