bool ExportDOL(const Volume& volume, const Partition& partition, const std::string& export_filename) { if (!IsDisc(volume.GetVolumeType())) return false; const std::optional<u64> dol_offset = GetBootDOLOffset(volume, partition); if (!dol_offset) return false; const std::optional<u32> dol_size = GetBootDOLSize(volume, partition, *dol_offset); if (!dol_size) return false; return ExportData(volume, partition, *dol_offset, *dol_size, export_filename); }
bool CFileSystemGCWii::ExportDOL(const std::string& _rExportFolder) const { u64 DolOffset = GetBootDOLOffset(); u32 DolSize = GetBootDOLSize(DolOffset); if (DolOffset == 0 || DolSize == 0) return false; std::vector<u8> buffer(DolSize); if (m_rVolume->Read(DolOffset, DolSize, &buffer[0], m_Wii)) { std::string exportName(_rExportFolder + "/boot.dol"); File::IOFile DolFile(exportName, "wb"); if (DolFile) { DolFile.WriteBytes(&buffer[0], DolSize); return true; } } return false; }