mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-11-02 05:17:52 +00:00
card_image: Add accessors for raw partitions in XCI
This commit is contained in:
parent
3952c73aee
commit
c4f3400bea
2 changed files with 36 additions and 0 deletions
|
@ -139,6 +139,35 @@ VirtualDir XCI::GetLogoPartition() {
|
||||||
return GetPartition(XCIPartition::Logo);
|
return GetPartition(XCIPartition::Logo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VirtualFile XCI::GetPartitionRaw(XCIPartition partition) const {
|
||||||
|
return partitions_raw[static_cast<std::size_t>(partition)];
|
||||||
|
}
|
||||||
|
|
||||||
|
VirtualFile XCI::GetSecurePartitionRaw() const {
|
||||||
|
return GetPartitionRaw(XCIPartition::Secure);
|
||||||
|
}
|
||||||
|
|
||||||
|
VirtualFile XCI::GetStoragePartition0() const {
|
||||||
|
return std::make_shared<OffsetVfsFile>(file, update_normal_partition_end, 0, "partition0");
|
||||||
|
}
|
||||||
|
|
||||||
|
VirtualFile XCI::GetStoragePartition1() const {
|
||||||
|
return std::make_shared<OffsetVfsFile>(file, file->GetSize() - update_normal_partition_end,
|
||||||
|
update_normal_partition_end, "partition1");
|
||||||
|
}
|
||||||
|
|
||||||
|
VirtualFile XCI::GetNormalPartitionRaw() const {
|
||||||
|
return GetPartitionRaw(XCIPartition::Normal);
|
||||||
|
}
|
||||||
|
|
||||||
|
VirtualFile XCI::GetUpdatePartitionRaw() const {
|
||||||
|
return GetPartitionRaw(XCIPartition::Update);
|
||||||
|
}
|
||||||
|
|
||||||
|
VirtualFile XCI::GetLogoPartitionRaw() const {
|
||||||
|
return GetPartitionRaw(XCIPartition::Logo);
|
||||||
|
}
|
||||||
|
|
||||||
u64 XCI::GetProgramTitleID() const {
|
u64 XCI::GetProgramTitleID() const {
|
||||||
return secure_partition->GetProgramTitleID();
|
return secure_partition->GetProgramTitleID();
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,6 +92,13 @@ public:
|
||||||
VirtualDir GetUpdatePartition();
|
VirtualDir GetUpdatePartition();
|
||||||
VirtualDir GetLogoPartition();
|
VirtualDir GetLogoPartition();
|
||||||
|
|
||||||
|
VirtualFile GetPartitionRaw(XCIPartition partition) const;
|
||||||
|
VirtualFile GetSecurePartitionRaw() const;
|
||||||
|
VirtualFile GetStoragePartition0() const;
|
||||||
|
VirtualFile GetStoragePartition1() const;
|
||||||
|
VirtualFile GetNormalPartitionRaw() const;
|
||||||
|
VirtualFile GetUpdatePartitionRaw() const;
|
||||||
|
VirtualFile GetLogoPartitionRaw() const;
|
||||||
|
|
||||||
u64 GetProgramTitleID() const;
|
u64 GetProgramTitleID() const;
|
||||||
u32 GetSystemUpdateVersion();
|
u32 GetSystemUpdateVersion();
|
||||||
|
|
Loading…
Reference in a new issue