mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-17 07:49:21 +00:00
DiscIO/DirectoryBlob: Add ability to have an offset for a partition ContentSource.
This commit is contained in:
parent
a14436fe3f
commit
b7a9cc37b1
2 changed files with 32 additions and 12 deletions
|
@ -43,11 +43,24 @@ struct ContentFile
|
|||
u64 m_offset;
|
||||
};
|
||||
|
||||
using ContentSource =
|
||||
std::variant<ContentFile, // File
|
||||
const u8*, // Memory
|
||||
DirectoryBlobReader* // Partition (which one it is is determined by m_offset)
|
||||
>;
|
||||
// Content chunk that loads data from a DirectoryBlobReader.
|
||||
// Intented for representing a partition within a disc.
|
||||
struct ContentPartition
|
||||
{
|
||||
// The reader to read data from.
|
||||
DirectoryBlobReader* m_reader;
|
||||
|
||||
// Offset from the start of the partition for the first byte represented by this chunk.
|
||||
u64 m_offset;
|
||||
|
||||
// The value passed as partition_data_offset to EncryptPartitionData().
|
||||
u64 m_partition_data_offset;
|
||||
};
|
||||
|
||||
using ContentSource = std::variant<ContentFile, // File
|
||||
const u8*, // Memory
|
||||
ContentPartition // Partition
|
||||
>;
|
||||
|
||||
class DiscContent
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue