Skip to content

feat(libScePlayerSelectionDialog): add common dialog lifecycle and tests - #6696

Open
al3w0f205 wants to merge 1 commit into
boykopovar:mainfrom
al3w0f205:feat/player-selection-dialog-support
Open

al3w0f205 wants to merge 1 commit into
boykopovar:mainfrom
al3w0f205:feat/player-selection-dialog-support

Conversation

@al3w0f205

Copy link
Copy Markdown
Contributor

What

Implements the common dialog lifecycle exports for libScePlayerSelectionDialog:

  • scePlayerSelectionDialogInitialize
  • scePlayerSelectionDialogOpen
  • scePlayerSelectionDialogGetStatus
  • scePlayerSelectionDialogUpdateStatus
  • scePlayerSelectionDialogGetResult
  • scePlayerSelectionDialogClose
  • scePlayerSelectionDialogTerminate
  • scePlayerSelectionDialogParamInitialize

Adds guest unit tests in core/libs/tests/GuestPlayerSelectionDialog.cpp verifying state transitions and parameter validation, and documents debt in docs/dev/debt/libScePlayerSelectionDialog.md.

Tested

Windows 11 (MinGW64 DWARF), ctest guest_player_selection_dialog passed 100%.

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
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Progress report (ccb0c09 → b62ecc8)

➖ System libraries: 90.28% (+0.0%, +1 implemented functions)

✅ 1 implemented
Library Name
libScePlayerSelectionDialog scePlayerSelectionDialogParamInitialize

@jotitadev jotitadev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran this on Linux, since the description only lists Windows.

  • Machine: Ubuntu 26.04, x86_64 (i7-8700), GCC 15.2.0, CMake 4.2.3 + Ninja, Release, BUILD_TESTING=ON, full tree.
  • Head: ce13b65f9, on top of main 5d9dcc42d (fast-forward).

Results:

  • Full build: clean, no warnings.
  • ctest -R "^guest_player_selection_dialog$": passes, 20/20 with --repeat until-fail:20.
  • Non-GPU suite (ctest -E "^agc|gpu|vulkan|video_out" -j10): same failures as main 5d9dcc42d (file_writer_binary and file_writer_text, which fail on this machine's coreutils and are unrelated). guest_host_standard_error timed out once under -j10 both on main and on this head, and passes on its own (5/5, about 2 s), so it is load-related and not caused by this PR.
  • tools/check_conventions.py --base origin/main: passes.
  • Check that the assertions run: with result[0] expected to be 0 instead of USER_CANCELED the test aborts; reverted, it passes.

The lifecycle matches libSceLoginDialog line for line (same status values, error codes and Close that leaves the status unchanged), so the two behave the same.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

@github-actions github-actions Bot added build docs prx needs rebase Conflicts with main, rebase needed labels Oct 16, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for this. #6058 has now merged with the same base dialog code, so this branch will conflict on GuestPlayerSelectionDialog.cpp and the test registration.

The part #6058 doesn't have is Close, GetStatus and ParamInitialize. Could you rebase onto main and cut this PR down to just those three, with their tests registered next to #6058's guest_player_selection_dialog test? We'll review it as soon as the new head is up.

@al3w0f205
al3w0f205 force-pushed the feat/player-selection-dialog-support branch from ce13b65 to 8935faf Compare October 18, 2026 01:15
@al3w0f205

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and trimmed this PR down to Close, GetStatus, and ParamInitialize on top of merged #6058, with corresponding test assertions added in core/libs/tests/GuestPlayerSelectionDialog.cpp.

Verified with guest_player_selection_dialog passing 100% and ools/check_conventions.py passing cleanly.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 18, 2026
@al3w0f205
al3w0f205 force-pushed the feat/player-selection-dialog-support branch from 8935faf to b62ecc8 Compare October 18, 2026 06:17
@al3w0f205

Copy link
Copy Markdown
Contributor Author

Rebased onto current main following the merge of Close and GetStatus. This PR now provides the remaining scePlayerSelectionDialogParamInitialize stub and test assertions. Verified locally with guest_player_selection_dialog passing 100% and tools/check_conventions.py passing cleanly.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 18, 2026
@adriadam10 adriadam10 self-assigned this Oct 19, 2026

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for trimming this down to the remaining export. One problem:

  • core/libs/prx/libScePlayerSelectionDialog/Export.cpp:66: scePlayerSelectionDialogParamInitialize returns success without touching param. The common-dialog *ParamInitialize functions zero the param struct and set its size/defaults (KytyPS5 LoginDialogParamInitialize does a memset + size, and returns void). Titles then pass that struct to Open, so leaving it uninitialised is a plausible-but-wrong result where main threw. Please either initialise it per a cited source for ScePlayerSelectionDialogParam (size and default fields), or, if the layout is unknown, throw NotImplemented_nid_no_patch for the non-null case.
  • core/libs/tests/GuestPlayerSelectionDialog.cpp:36-37: the test should pin the written bytes (pre-fill the param with a non-zero pattern and check what ParamInitialize leaves), otherwise it passes with the current no-op.
  • docs/dev/debt/libScePlayerSelectionDialog.md:4: the entry only lists the new import; if any part of the struct is left unfilled, say which under Silent stubs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants