mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-04-22 12:34:47 +00:00
ncm client: finish implementing GetContentMetaInfoList
This commit is contained in:
parent
12670e1a01
commit
6d0250124a
1 changed files with 10 additions and 2 deletions
|
@ -424,8 +424,16 @@ namespace ams::ncm {
|
|||
return reinterpret_cast<FirmwareVariationInfo *>(this->GetFirmwareVariationInfoAddress(i));
|
||||
}
|
||||
|
||||
void GetContentMetaInfoList() const {
|
||||
/* TODO */
|
||||
void GetContentMetaInfoList(Span<const ContentMetaInfo> *out_list, size_t i) const {
|
||||
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…
Add table
Reference in a new issue