mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[XContent] Aggregate license mask from all licenses while installing package
This should fix issues with some DLCs
This commit is contained in:
parent
ad323dd9d8
commit
d660a82997
|
|
@ -468,10 +468,12 @@ struct XContentMetadata {
|
||||||
};
|
};
|
||||||
static_assert_size(XContentMetadata, 0x93D6);
|
static_assert_size(XContentMetadata, 0x93D6);
|
||||||
|
|
||||||
|
static constexpr uint8_t license_count = 0x10;
|
||||||
|
|
||||||
struct XContentHeader {
|
struct XContentHeader {
|
||||||
be<XContentPackageType> magic;
|
be<XContentPackageType> magic;
|
||||||
uint8_t signature[0x228];
|
uint8_t signature[0x228];
|
||||||
XContentLicense licenses[0x10];
|
XContentLicense licenses[license_count];
|
||||||
uint8_t content_id[0x14];
|
uint8_t content_id[0x14];
|
||||||
be<uint32_t> header_size;
|
be<uint32_t> header_size;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,13 @@ class XContentContainerDevice : public Device {
|
||||||
|
|
||||||
kernel::xam::XCONTENT_AGGREGATE_DATA content_header() const;
|
kernel::xam::XCONTENT_AGGREGATE_DATA content_header() const;
|
||||||
uint32_t license_mask() const {
|
uint32_t license_mask() const {
|
||||||
return header_->content_header.licenses[0].license_bits;
|
uint32_t final_license = 0;
|
||||||
|
for (uint8_t i = 0; i < license_count; i++) {
|
||||||
|
if (header_->content_header.licenses[i].license_flags) {
|
||||||
|
final_license |= header_->content_header.licenses[i].license_bits;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return final_license;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue