Commit Graph
9 Commits
Author SHA1 Message Date
orezraeyandClaude Opus 5.5 2a0f252396 feat(libSceNpManager): accept game presence callbacks while signed out
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 10:43:48 -03:00
Adrià 1a2d485032 Merge pull request #7597 from voidlakhan/fix/np-null-pointer-checks
fix(npmanager): validate null output pointers
2026-10-20 01:15:52 +02:00
Adrià b5ab10185b Merge pull request #6121 from fdfawef324/claude/mc-np-state-callbacks
feat(libSceNpManager): register NP state callbacks and report signed-out from sceNpCheckCallback
2026-10-18 18:57:53 +02:00
lakhantheboss 766f4ea872 fix(npmanager): validate null output pointers 2026-10-18 21:40:59 +05:30
notaxeltvandCursor af9d039d61 feat(libSceNpManager): export two unknown NIDs so PPSA34015 can load
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 23:40:42 +02:00
alfalfa-starandClaude Opus 5.5 56d8b4f68d feat(npmanager): implement sceNpGetUserIdByAccountId
Account id 0 or a null output returns SCE_NP_ERROR_INVALID_ARGUMENT;
otherwise the always signed-out NP returns SCE_NP_ERROR_SIGNED_OUT, as
sceNpGetAccountIdA does. PPSA14632 imports it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 08:00:31 +02:00
fdfawef324andClaude Opus 5.5 9f96444c4a feat(libSceNpManager): register NP state callbacks and report signed-out from sceNpCheckCallback
sceNpRegisterStateCallback and sceNpRegisterStateCallbackA stored nothing,
the unregister calls always succeeded and sceNpCheckCallback did nothing,
so a title that waits for its NP state callback never learned the user's
state. #1277 reports that Minecraft Preview (PPSA19639) needs the callback
(stop 2).

sceNpRegisterStateCallbackA now keeps up to 8 callbacks and returns the
slot plus 1. A null callback returns INVALID_ARGUMENT, a callback that is
already registered CALLBACK_ALREADY_REGISTERED and a ninth one
CALLBACK_MAX (0x8055001D). sceNpUnregisterStateCallbackA returns
INVALID_ARGUMENT for an id outside 1..8 and CALLBACK_NOT_REGISTERED for an
empty slot. The legacy sceNpRegisterStateCallback keeps one callback with
the same errors. The rules follow shadPS4
src/core/libraries/np/np_manager.cpp @15abf68c9b52 (RegisterStateCallbackA
and UnregisterStateCallbackAById L857-L901, the legacy pair L981-L1005,
ORBIS_NP_STATE_CALLBACK_MAX L36) and np_error.h L38.

Each registration is marked pending. sceNpCheckCallback takes the pending
registrations under the lock and calls them after releasing it, on the
calling thread, with SIGNED_OUT for the initial user 0x10000000. For the A
form this follows KytyPS5 src/libs/network.cpp @9e41d8320a27
(NpRegisterStateCallbackA L4021-L4034 marks the registration pending,
NpCheckCallback L3959-L3974 delivers it once). KytyPS5 never calls the
legacy callback (NpRegisterStateCallback and NpUnregisterStateCallback,
L4009-L4019, do nothing). The legacy callback is called as
(user, SIGNED_OUT, nullptr, userdata), as in shadPS4, which passes an NpId
only for SIGNED_IN (L823, L938-L940).

shadPS4 queues SIGNED_OUT from the user service login event instead
(DispatchPendingNpStateCallbacks L903-L962), and the same event calls the
reachability callback once with UNAVAILABLE (L922-L931, L959-L961). The
reachability callback is still not called here. These differences and the
unmeasured console behaviour are recorded in
docs/dev/debt/libSceNpManager.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:12:19 -04:00
AlexandGPT-6.1-sol 2a675598f2 feat(libSceNpManager): add the missing request timeout export
Validate timeout arguments and track live requests so unknown or deleted
ids return REQUEST_NOT_FOUND. This supplies the remaining absent load
import alongside the dialog Close export; timeouts follow the existing
offline network model and are not stored.

Co-Authored-By: GPT-6.1-sol <noreply@openai.com>
2026-10-10 12:57:01 -04:00
Alidin 953e6ceacf feat(libSceNpManager): implement sceNpGetNpId
Report the user as signed out, as the other identity getters do, and reject a null NpId. The NpId is left untouched, as in shadPS4 and prosper.
2026-10-07 01:18:42 +08:00