DiscIO/DirectoryBlob: Add a content source representing a run of padding bytes.

This commit is contained in:
Admiral H. Curtiss
2021-09-22 03:02:39 +02:00
parent f8611f7139
commit b1802f6daa
2 changed files with 14 additions and 1 deletions

View File

@ -132,6 +132,11 @@ bool DiscContent::Read(u64* offset, u64* length, u8** buffer) const
return false;
}
}
else if (std::holds_alternative<ContentFixedByte>(m_content_source))
{
const ContentFixedByte& source = std::get<ContentFixedByte>(m_content_source);
std::fill_n(*buffer, bytes_to_read, source.m_byte);
}
else
{
PanicAlertFmt("DirectoryBlob: Invalid content source in DiscContent.");