feat(libSceNpManager): accept game presence callbacks while signed out #8490

Merged
orezraey merged 1 commit from upstream-pr/8490 into main 2026-10-21 04:49:33 +00:00
orezraey commented 2026-10-20 13:41:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by orezraey on 2026-10-20T13:41:57Z.


What

sceNpRegisterGamePresenceCallback threw NotImplemented. It now accepts the registration and returns, like sceNpRegisterPlusEventCallback and sceNpRegisterPremiumEventCallback beside it: the NP model stays signed out, so no game presence event can be delivered, and the function returns void, so there is no error to report.

Two references agree on this:

  • Kyty ignores the callback and user data.
  • shadPS4 keeps the last callback and user data without calling them.

The entry in docs/dev/debt/libSceNpManager.md (at the end of Functional, after the lines #8110 also edits) records both and that nothing is measured on a PS5.

guest_np_manager registers a null callback and a callback that aborts if called, then runs sceNpCheckCallback, which must not call it.

Tested

  • Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON.
  • guest_np_manager fails with Export.cpp from main (the registration throws) and passes with this change.
  • tools/check_conventions.py --base origin/main passes.
  • Not tested: a title that registers the callback, Linux or macOS.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4936642331 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8490). Originally posted by [orezraey](https://github.com/orezraey) on 2026-10-20T13:41:57Z. --- ### What `sceNpRegisterGamePresenceCallback` threw `NotImplemented`. It now accepts the registration and returns, like `sceNpRegisterPlusEventCallback` and `sceNpRegisterPremiumEventCallback` beside it: the NP model stays signed out, so no game presence event can be delivered, and the function returns `void`, so there is no error to report. Two references agree on this: - [Kyty](https://github.com/InoriRus/Kyty/blob/4733b7e1c91b10554a52007903d74dc76c39a230/source/emulator/src/Network.cpp#L1549-L1552) ignores the callback and user data. - [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/8d50471b7dc141dd700b51276b8edd1f293bce26/src/core/libraries/np/np_manager.cpp#L1121-L1126) keeps the last callback and user data without calling them. The entry in `docs/dev/debt/libSceNpManager.md` (at the end of Functional, after the lines #8110 also edits) records both and that nothing is measured on a PS5. `guest_np_manager` registers a null callback and a callback that aborts if called, then runs `sceNpCheckCallback`, which must not call it. ### Tested - Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`. - `guest_np_manager` fails with `Export.cpp` from `main` (the registration throws) and passes with this change. - `tools/check_conventions.py --base origin/main` passes. - Not tested: a title that registers the callback, Linux or macOS. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-20 13:42:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T13:42:34Z.


Progress report (52f7807 → 2a0f252)

📈 System libraries: 64.21% (+0.02%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceNpManager sceNpRegisterGamePresenceCallback
⚪ 1 behaviourally empty (constant return or throw)
Library Name
libSceNpManager sceNpRegisterGamePresenceCallback
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6292274198 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8490#issuecomment-6292274198). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T13:42:34Z. --- <!-- progress-report --> ### Progress report (52f7807 → 2a0f252) 📈 **System libraries**: 64.21% (+0.02%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceNpManager | `sceNpRegisterGamePresenceCallback` | </details> <details> <summary>⚪ 1 behaviourally empty (constant return or throw)</summary> | Library | Name | | - | - | | libSceNpManager | `sceNpRegisterGamePresenceCallback` | </details>
github-actions[bot] commented 2026-10-20 13:55:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T13:55:37Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestNpManager.cpp
PR 6977 core/libs/prx/libSceNpManager/Export.cpp
docs/dev/debt/libSceNpManager.md
PR 7412 core/libs/prx/libSceNpManager/Export.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6292541495 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8490#issuecomment-6292541495). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T13:55:37Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestNpManager.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceNpManager/Export.cpp`<br>`docs/dev/debt/libSceNpManager.md` | | [PR 7412](https://www.github.com/boykopovar/AnyPS5/pull/7412) | `core/libs/prx/libSceNpManager/Export.cpp` |
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!8490
No description provided.