feat(logindialog): implement the libSceLoginDialog state machine #559
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/559"
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 Phi1ow on 2026-10-04T20:42:38Z.
What
The seven
libSceLoginDialogexports were throwing stubs. They now implement the common-dialogstate machine (
NONE -> INITIALIZED -> RUNNING -> FINISHED), mirroring the existinglibSceSigninDialog: the local user is always signed in, so the dialog finishes as soon as itopens and a title waiting on it never blocks.
sceLoginDialogInitialize->INITIALIZED, or0x80B80004if already initialized.sceLoginDialogOpen(param)-> requiresINITIALIZED/FINISHED(elseNOT_INITIALIZED, orBUSYwhile running), rejects a null parameter, thenFINISHED.sceLoginDialogUpdateStatus/sceLoginDialogGetStatus-> the status.sceLoginDialogGetResult-> zeroes the result (signed in) onceFINISHED; otherwiseNOT_INITIALIZED/ARG_NULL/NOT_FINISHED.sceLoginDialogClose-> ok, or0x80B80003when not initialized.sceLoginDialogTerminate->NONE, or0x80B80003when not initialized.The status values and the shared common-dialog error codes match
libSceSigninDialogandlibSceWebBrowserDialog. Adds aCMakeLists.txtso the library can carry its guest test.Tested
New test
core/libs/tests/GuestLoginDialog.cpp(registered asguest_login_dialog) drivesthe whole machine: the not-initialized and already-initialized errors, the argument and
not-finished errors, open / get-result / close and terminate.
Built with MinGW-w64 GCC 15.2.0 (the CI toolchain) on Windows 11;
ctest -R guest_login_dialogpasses. On
mainthe seven functions thrownot implemented, so the test aborts without thechange.
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 oneandonlydean on 2026-10-04T21:19:43Z.
Thanks. The state machine is the same as the existing
libSceSigninDialog, and the status values and error codes match it. My concern issceLoginDialogGetResult:sceWebBrowserDialogGetResulton main only writes the leadingint32result, which every common dialog result starts with. I'd do the same here unless you have a source for the layout.USER_CANCELEDfor the sign-in dialog, likelibSceWebBrowserDialog. Unless the full result layout is known, I'd reportUSER_CANCELEDhere too, so a title takes its "no user chosen" path instead of reading an invalid user id.Please also add the dialog to the "Silent stubs" list in docs/dev/TechnicalDebt.md, since it finishes without any UI. The CI run on this PR still needs approval.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-04T22:31:40Z.
Progress report (
5fc8755→0178b65)📈 System libraries: 87.32% (+0.24%, +7 implemented functions)
✅ 7 implemented
sceLoginDialogClosesceLoginDialogGetResultsceLoginDialogGetStatussceLoginDialogInitializesceLoginDialogOpensceLoginDialogTerminatesceLoginDialogUpdateStatusImported from boykopovar/AnyPS5. Originally posted by Phi1ow on 2026-10-04T22:34:23Z.
Done.
sceLoginDialogGetResultnow writes only the leadingint32(USER_CANCELED), likesceWebBrowserDialogGetResultand the sign-in dialog, so a title takes its "no user chosen" path instead of reading an invalid user id. Also added the dialog to the "Silent stubs" list.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T23:43:54Z.
Thanks,
sceLoginDialogGetResultnow writes only the leading int32 withUSER_CANCELED, the same as the sign-in and web browser dialogs, and the dialog is in the silent stubs list.guest_login_dialogpasses here and CI is green. Ready to merge from my side (the TechnicalDebt line sits next to #558's and #560's, so a one-line rebase may be needed depending on order).Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-05T01:18:17Z.
#558 is on main now, and its libSceErrorDialog line sits where this one goes in the silent stubs list of docs/dev/TechnicalDebt.md, so this needs a one-line rebase that keeps both lines. #560 adds its line at the same spot, so whichever of the two lands second will need the same. Ready to merge from my side after that.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T21:20:52Z.
Are you still working on this? It still needs the one-line
docs/dev/TechnicalDebt.mdrebase from 10-05; the code was ready from my side then. If you'd rather not continue, please say so, and it can be closed.Imported from boykopovar/AnyPS5. Originally posted by Phi1ow on 2026-10-06T21:52:17Z.
Rebased. The silent-stubs rebase keeps #558's libSceErrorDialog line and adds the libSceLoginDialog one next to it. guest_login_dialog passes here.