feat(libSceNpManager): implement sceNpRegisterGamePresenceCallback and sceNpSetContentRestriction #926
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/926"
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 Adin-bima on 2026-10-06T17:22:06Z.
What
Implements the last two libSceNpManager stubs on its signed-out model:
sceNpRegisterGamePresenceCallback(returnsvoid) accepts the callback. Presence never changes while signed out, so it is never called, as with the other registered NP callbacks here.sceNpSetContentRestrictionreturnsSCE_NP_ERROR_INVALID_ARGUMENTfor a null restriction, else 0. shadPS4 also checks the size and fields of a 24-byte PS4 layout, whileNpContentRestrictionhere is opaque; those checks are not applied and this is recorded in TechnicalDebt. prosper returns 0 for both calls.Depends on #924: it adds
core/libs/prx/libSceNpManager/CMakeLists.txtandGuestNpManager.cpp, which this extends. Only the last commit belongs to this PR.Tested
Linux (GCC),
guest_np_managerextended: callback registration with and without a callback, content restriction accepted, null rejected. Fullctest: 358/360 passed;agc_driver_lds_atomics64andagc_driver_scalar_sop1fail the same way on unmodifiedmainon this machine (RTX 5070 Ti). Not tested with a title.Checklist
main; no other open PR implements the same functions — #346 (opened earlier) implements the same functions; this is offered as a replacement if #346 is not continuedNotImplemented_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-07T20:56:15Z.
Progress report (
5895ea7→6204528)📈 System libraries: 87.1% (+0.1%, +3 implemented functions)
✅ 3 implemented
sceNpGetNpIdsceNpRegisterGamePresenceCallbacksceNpSetContentRestrictionImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-07T20:57:36Z.
Review: CHANGES_REQUESTED
Build and ctest pass (405/405, merged onto current
main), andguest_np_managerfails without the Export.cpp change.sceNpRegisterGamePresenceCallbackmatches KytyPS5, shadPS4 and prosper. One issue withsceNpSetContentRestriction:src/libs/network.cppNpContentRestriction) has the same 24-byte struct as shadPS4:size_t size; int8_t default_age_restriction; char padding[3]; int32_t age_restriction_count; const NpAgeRestriction* age_restriction;. Both reject a wrongsize: shadPS4 returnsSCE_NP_ERROR_INVALID_SIZE(0x80550011, same value in KytyPS5 and fpPS4), and KytyPS5 aborts. As written,Export.cpp:150returns 0 for any non-null pointer, so a garbage or wrong-size restriction succeeds where it should fail (CONTRIBUTING: exact or throw). Suggested direction: replace theopaque[128]placeholder inSceTypes.hpp:1248with that layout and apply shadPS4's checks (size,default_age_restriction < 0,age_restriction_count > 0x100, null list with a non-zero count). Pin each one in the test, and change the TechnicalDebt line to say which references the checks come from (prosper only logs and returns 0).core/libs/tests/GuestNpManager.cppconflicts with #1241 (both append to the same spot). Whichever lands second needs a rebase.Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T19:42:12Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
6204528c, merged ontomain8b393b6ein one build with 31 other PRs that had no Windows run.guest_np_manager.guest_offline_imports, broken by #2359 (reported there).No title was run.
🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T01:07:35Z.
Closing for now: the points from 2026-10-07 are still open. If you pick it back up, please comment here and it can be reopened.
Pull request closed