diff --git a/nx/source/services/ns.c b/nx/source/services/ns.c index 2eb75919..a1c290e4 100644 --- a/nx/source/services/ns.c +++ b/nx/source/services/ns.c @@ -131,6 +131,48 @@ Result nsListApplicationRecord(NsApplicationRecord* buffer, size_t size, int* ou return rc; } +Result nsListApplicationContentMetaStatus(u64 title_id, u32 index, NsApplicationContentMetaStatus* buffer, size_t size, int* out_entrycount) +{ + IpcCommand c; + ipcInitialize(&c); + + ipcAddRecvBuffer(&c, buffer, size, 0); + + struct + { + u64 magic; + u64 cmd_id; + u32 index; + u64 titleID; + } *raw; + + raw = ipcPrepareHeader(&c, sizeof(*raw)); + + raw->magic = SFCI_MAGIC; + raw->cmd_id = 601; + raw->index = index; + raw->titleID = title_id; + + Result rc = serviceIpcDispatch(&g_nsAppManSrv); + + if (R_SUCCEEDED(rc)) { + IpcParsedCommand r; + ipcParse(&r); + + struct { + u64 magic; + u64 result; + u32 entry_count; + } *resp = r.Raw; + + rc = resp->result; + + if (R_SUCCEEDED(rc) && out_entrycount) *out_entrycount = resp->entry_count; + } + + return rc; +} + Result nsGetApplicationControlData(u8 flag, u64 titleID, NsApplicationControlData* buffer, size_t size, size_t* actual_size) { IpcCommand c; ipcInitialize(&c);