service/am: Clean up and optimize CIA installation. (#6718)
This commit is contained in:
@@ -181,6 +181,12 @@ std::array<u8, 16> TitleMetadata::GetContentCTRByIndex(std::size_t index) const
|
||||
return ctr;
|
||||
}
|
||||
|
||||
bool TitleMetadata::HasEncryptedContent() const {
|
||||
return std::any_of(tmd_chunks.begin(), tmd_chunks.end(), [](auto& chunk) {
|
||||
return (static_cast<u16>(chunk.type) & FileSys::TMDContentTypeFlag::Encrypted) != 0;
|
||||
});
|
||||
}
|
||||
|
||||
void TitleMetadata::SetTitleID(u64 title_id) {
|
||||
tmd_body.title_id = title_id;
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ public:
|
||||
u16 GetContentTypeByIndex(std::size_t index) const;
|
||||
u64 GetContentSizeByIndex(std::size_t index) const;
|
||||
std::array<u8, 16> GetContentCTRByIndex(std::size_t index) const;
|
||||
bool HasEncryptedContent() const;
|
||||
|
||||
void SetTitleID(u64 title_id);
|
||||
void SetTitleType(u32 type);
|
||||
|
||||
Reference in New Issue
Block a user