feat(libSceShare): capture, open menu and current status calls #737

Merged
adriadam10 merged 1 commit from upstream-pr/737 into main 2026-10-05 23:38:50 +00:00
adriadam10 commented 2026-10-05 18:40:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-05T18:40:38Z.


What

Implements four libSceShare exports that threw, following KytyPS5 src/libs/libShare.cpp (no other reference has a body):

  • sceShareCaptureScreenshot, sceShareCaptureVideoClip: write -1 (invalid request id) to req_id when it is non-null and return 0x81960007 (not supported), the same as sceShareCaptureScreenshotExtended in #712.
  • sceShareOpenMenuForContent: returns 0x81960007.
  • sceShareGetCurrentStatus: returns 0x81960002 (invalid param) for a zero feature flag or a null status, otherwise zeroes the 16-byte ShareCurrentStatus and returns 0. The zeroed status comes only from KytyPS5, so it is listed under "Unknown function info" in TechnicalDebt.

Stacked on #712 (its commit is the first one here; it adds the GuestShare test and the error constants). This PR is only the second commit.

libSceShare.native has the same four stubs. They are left as they are. SharpProspero's stub catalog links titles against libSceShare with no .native file name (unlike Audiodec/Ajm/AvPlayer), so this PR implements them there. @boykopovar: should the duplicated .native stubs be removed, as for Ajm (#228)?

Tested

Linux, GCC Release: guest_share covers both capture calls with and without req_id/param, the open-menu call, and the status call (valid flags, every byte of the 16-byte status zeroed, the bytes after it untouched, zero flag, null status). On main the test fails because the stubs throw. Each new piece was replaced by a wrong value one at a time, and the test failed every time. ctest -R guest_ 96/96 passed.

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 in TechnicalDebt
  • 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: #712
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4749354568 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/737). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-05T18:40:38Z. --- ### What Implements four libSceShare exports that threw, following [KytyPS5](https://github.com/KytyPS5/KytyPS5) `src/libs/libShare.cpp` (no other reference has a body): - `sceShareCaptureScreenshot`, `sceShareCaptureVideoClip`: write `-1` (invalid request id) to `req_id` when it is non-null and return `0x81960007` (not supported), the same as `sceShareCaptureScreenshotExtended` in #712. - `sceShareOpenMenuForContent`: returns `0x81960007`. - `sceShareGetCurrentStatus`: returns `0x81960002` (invalid param) for a zero feature flag or a null status, otherwise zeroes the 16-byte `ShareCurrentStatus` and returns 0. The zeroed status comes only from KytyPS5, so it is listed under "Unknown function info" in TechnicalDebt. Stacked on #712 (its commit is the first one here; it adds the `GuestShare` test and the error constants). This PR is only the second commit. `libSceShare.native` has the same four stubs. They are left as they are. SharpProspero's stub catalog links titles against `libSceShare` with no `.native` file name (unlike Audiodec/Ajm/AvPlayer), so this PR implements them there. @boykopovar: should the duplicated `.native` stubs be removed, as for Ajm (#228)? ### Tested Linux, GCC Release: `guest_share` covers both capture calls with and without `req_id`/param, the open-menu call, and the status call (valid flags, every byte of the 16-byte status zeroed, the bytes after it untouched, zero flag, null status). On `main` the test fails because the stubs throw. Each new piece was replaced by a wrong value one at a time, and the test failed every time. `ctest -R guest_` 96/96 passed. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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: #712 - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-05 18:41:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T18:41:01Z.


Progress report (bc24783 → f4b5b1b)

📈 System libraries: 79.66% (+0.12%, +4 implemented functions)

✅ 4 implemented
Library Name
libSceShare sceShareCaptureScreenshot
libSceShare sceShareCaptureVideoClip
libSceShare sceShareGetCurrentStatus
libSceShare sceShareOpenMenuForContent
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6000800983 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/737#issuecomment-6000800983). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-05T18:41:01Z. --- <!-- progress-report --> ### Progress report (bc24783 → f4b5b1b) 📈 **System libraries**: 79.66% (+0.12%, +4 implemented functions) <details> <summary>✅ 4 implemented</summary> | Library | Name | | - | - | | libSceShare | `sceShareCaptureScreenshot` | | libSceShare | `sceShareCaptureVideoClip` | | libSceShare | `sceShareGetCurrentStatus` | | libSceShare | `sceShareOpenMenuForContent` | </details>
oneandonlydean commented 2026-10-05 20:30:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-05T20:30:15Z.


Thanks for this. #712 has landed, so this now conflicts with main in libSceShare/Export.cpp, core/libs/tests/GuestShare.cpp and docs/dev/TechnicalDebt.md. Your branch already contains #712's change, so the rebase should be straightforward:

  • Export.cpp: keep one copy of sceShareCaptureScreenshotExtended and of the ERROR_NOT_SUPPORTED / REQUEST_ID_INVALID constants.
  • GuestShare.cpp: take your version; it covers everything the one on main tests.
  • TechnicalDebt.md: keep your sceShareGetCurrentStatus line and the _sceUlobjmgrRegisterObject line from #707 above it.

With that resolved, the NIDs match the names and guest_share fails on main's code and passes with the change (Linux, GCC).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6002366340 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/737#issuecomment-6002366340). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-05T20:30:15Z. --- Thanks for this. #712 has landed, so this now conflicts with `main` in `libSceShare/Export.cpp`, `core/libs/tests/GuestShare.cpp` and `docs/dev/TechnicalDebt.md`. Your branch already contains #712's change, so the rebase should be straightforward: - `Export.cpp`: keep one copy of `sceShareCaptureScreenshotExtended` and of the `ERROR_NOT_SUPPORTED` / `REQUEST_ID_INVALID` constants. - `GuestShare.cpp`: take your version; it covers everything the one on `main` tests. - `TechnicalDebt.md`: keep your `sceShareGetCurrentStatus` line and the `_sceUlobjmgrRegisterObject` line from #707 above it. With that resolved, the NIDs match the names and `guest_share` fails on main's code and passes with the change (Linux, GCC).
adriadam10 commented 2026-10-05 22:29:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-05T22:29:35Z.


Rebased on current main (dropped #712's commit, now on main): one copy of sceShareCaptureScreenshotExtended and its constants, my GuestShare.cpp, and the sceShareGetCurrentStatus line below #707's. guest_share passes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6004470388 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/737#issuecomment-6004470388). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-05T22:29:35Z. --- Rebased on current `main` (dropped #712's commit, now on main): one copy of `sceShareCaptureScreenshotExtended` and its constants, my `GuestShare.cpp`, and the `sceShareGetCurrentStatus` line below #707's. `guest_share` passes.
github-actions[bot] commented 2026-10-05 23:10:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T23:10:05Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#582 docs/dev/TechnicalDebt.md L106
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6005106522 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/737#issuecomment-6005106522). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-05T23:10:05Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #582 | `docs/dev/TechnicalDebt.md` [L106](https://github.com/boykopovar/AnyPS5/blob/9c3ef3a6a9a52a7b032a7dca3dc05639d40bc1f2/docs/dev/TechnicalDebt.md#L106) | | |
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!737
No description provided.