Files
AnyPS5/docs/dev/debt/libSceNpProfileDialog.md
T
Rookie 40970647ca feat(libSceNpProfileDialog): implement the dialog lifecycle
Initialize, Terminate, UpdateStatus, GetStatus, Open, OpenA, Close and
GetResult run the common-dialog state machine. There is no PSN profile
UI, so Open and OpenA finish at once and GetResult reports result 0,
userAction USER_CANCELED and the caller's userData, as shadPS4 does when
its window is dismissed.

Paths where shadPS4 and the other common dialogs here return different
errors throw, and so does a param whose size or mode does not match the
shadPS4 layout. The common-dialog codes the library uses are added to
libSceCommonDialog/CommonDialog.hpp.
2026-10-23 09:18:29 +01:00

2.3 KiB

libSceNpProfileDialog technical debt

Silent stubs

Unknown function info

  • sceNpProfileDialogOpen, sceNpProfileDialogOpenA, sceNpProfileDialogGetResult (libSceNpProfileDialog) - the layouts come from the shadPS4 header alone: SceNpProfileDialogParam 128 bytes with userData at 88, SceNpProfileDialogParamA 120 bytes with 4 unnamed bytes after targetAccountId and userData at 80, the result 48 bytes. A param whose size is not that size, or whose mode is not 1 to 4, throws. baseParam (size, magic), userId and the target ID are not checked.
  • sceNpProfileDialogOpen, sceNpProfileDialogOpenA, sceNpProfileDialogClose, sceNpProfileDialogGetResult (libSceNpProfileDialog) - these paths throw because shadPS4 and the other common dialogs here return different errors: Open or OpenA before Initialize (shadPS4 INVALID_STATE, the Signin family NOT_INITIALIZED); Close on a dialog that is not running, which is every Close after Initialize here (shadPS4 NOT_RUNNING, the Signin family 0 and FINISHED); GetResult with a null result before the dialog finishes (shadPS4 ARG_NULL, Signin and NetCtlAp NOT_FINISHED).

Functional

  • sceNpProfileDialogInitialize (libSceNpProfileDialog) - never returns shadPS4's NOT_SYSTEM_INITIALIZED (sceCommonDialogInitialize not called) or BUSY (another common dialog in use): libSceCommonDialog shares neither state here.