summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/Src/FileSystemGCWii.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DiscIO/Src/FileSystemGCWii.cpp')
-rw-r--r--Source/Core/DiscIO/Src/FileSystemGCWii.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/Core/DiscIO/Src/FileSystemGCWii.cpp b/Source/Core/DiscIO/Src/FileSystemGCWii.cpp
index 6103f53e67..47651e2f23 100644
--- a/Source/Core/DiscIO/Src/FileSystemGCWii.cpp
+++ b/Source/Core/DiscIO/Src/FileSystemGCWii.cpp
@@ -153,7 +153,7 @@ bool CFileSystemGCWii::ExportApploader(const char* _rExportFolder) const
return false;
}
-bool CFileSystemGCWii::ExportDOL(const char* _rExportFolder) const
+u32 CFileSystemGCWii::GetBootDOLSize() const
{
u32 DolOffset = Read32(0x420) << m_OffsetShift;
u32 DolSize = 0, offset = 0, size = 0;
@@ -175,6 +175,19 @@ bool CFileSystemGCWii::ExportDOL(const char* _rExportFolder) const
if (offset + size > DolSize)
DolSize = offset + size;
}
+ return DolSize;
+}
+
+bool CFileSystemGCWii::GetBootDOL(u8* &buffer, u32 DolSize) const
+{
+ u32 DolOffset = Read32(0x420) << m_OffsetShift;
+ return m_rVolume->Read(DolOffset, DolSize, buffer);
+}
+
+bool CFileSystemGCWii::ExportDOL(const char* _rExportFolder) const
+{
+ u32 DolOffset = Read32(0x420) << m_OffsetShift;
+ u32 DolSize = GetBootDOLSize();
std::vector<u8> buffer(DolSize);
if (m_rVolume->Read(DolOffset, DolSize, &buffer[0]))