feat(libSceNpManager): implement sceNpSetContentRestriction and sceNpRegisterGamePresenceCallback offline #4531
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4531"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by NahuelGenchi on 2026-10-12T14:38:40Z.
What
Replaces #2398, which the intake bot closed under the earlier paused-intake rule and GitHub would not let me reopen. Main has since taken
sceNpCheckNpAvailability, and #2852 is open forsceNpGetUserIdByAccountId, so this keeps only the two calls nobody else has:sceNpSetContentRestrictionwas declared with an opaque 128-byte structure and threw as not implemented. It now has the real layout (size, default age, count and a pointer to country and age pairs, 24 bytes with an 8-byte pair) and checks it the way shadPS4 does: a null structure is an invalid argument, a size that is not 24 isINVALID_SIZE, a negative age or count, a count over 256, or a nonzero count with no list is an invalid argument. A valid structure is accepted and dropped, since the model has no age rating to apply it to.sceNpRegisterGamePresenceCallbackkeeps the last callback and user data under a mutex and never calls it, as no presence update ever arrives.Both are listed in TechnicalDebt with shadPS4 as the source of the checks. None of this was measured on a console.
Tested
Ubuntu 26.04, GCC 15.2.
guest_np_managernow covers a default age only, per country ages, a missing list, 256 and 257 entries, a negative count, a negative default age, a wrong size and a null structure, plus registering and clearing the presence callback. The convention and overlap checks pass. Not run on Windows.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T14:39:05Z.
Progress report (
d167000→79881d6)📈 System libraries: 88.24% (+0.06%, +2 implemented functions)
✅ 2 implemented
sceNpRegisterGamePresenceCallbacksceNpSetContentRestrictionImported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T17:18:31Z.
Windows test: head
e61d87701merged onto currentmain2a5eca11c(clean merge, no conflicts). Windows 10, MinGW GCC (WinLibs), Ninja Release,-j2: full build 0 errors; ctest with the filterguest_np_manager: guest_np_manager passed (1 test(s), 0 failed);python tools/check_conventions.py --base upstream/mainpassed. I did not run the new tests againstmainwithout the change.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T00:21:00Z.
Which title reaches
sceNpSetContentRestrictionorsceNpRegisterGamePresenceCallbackon main? The layout and checks are what was asked for on #926, so with the title ID and the log line this can go in; otherwise I'll close it until one does.Please also rebase instead of merging main in (
a0f0159cb); branches here carry no merge commits.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T09:12:35Z.
Closing: no title is known to reach
sceNpSetContentRestrictionorsceNpRegisterGamePresenceCallbackon main, and while the queue is this long we're holding PRs that don't name one. Please reopen with the title ID and the log line where it stops on current main; the layout and checks are fine as they are.Pull request closed