mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-07-17 22:22:21 +02:00
ncm client: finish implementing GetContentMetaInfoList
This commit is contained in:
parent
12670e1a01
commit
6d0250124a
@ -424,8 +424,16 @@ namespace ams::ncm {
|
|||||||
return reinterpret_cast<FirmwareVariationInfo *>(this->GetFirmwareVariationInfoAddress(i));
|
return reinterpret_cast<FirmwareVariationInfo *>(this->GetFirmwareVariationInfoAddress(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetContentMetaInfoList() const {
|
void GetContentMetaInfoList(Span<const ContentMetaInfo> *out_list, size_t i) const {
|
||||||
/* TODO */
|
size_t preceding_content_meta_count = 0;
|
||||||
|
|
||||||
|
/* Count the number of preceding content metas. */
|
||||||
|
for (size_t j = 0; j < i; j++) {
|
||||||
|
preceding_content_meta_count += GetFirmwareVariationInfo(j)->content_meta_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Output the list. */
|
||||||
|
*out_list = Span<const ContentMetaInfo>(reinterpret_cast<const ContentMetaInfo *>(GetContentMetaInfoAddress(preceding_content_meta_count)), GetFirmwareVariationInfo(i)->content_meta_count);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user