feat(libSceGameLiveStreaming): implement sceGameLiveStreamingEnableLiveStreaming #9319

Merged
savvaniss merged 2 commits from upstream-pr/9319 into main 2026-10-23 00:02:33 +00:00
savvaniss commented 2026-10-21 18:20:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-21T18:20:02Z.


What

Implements sceGameLiveStreamingEnableLiveStreaming, which #8114 only declared.

  • Signature: int sceGameLiveStreamingEnableLiveStreaming(const bool isEnableLiveStreaming), from Orbital's type database; fpPS4 has the same one-Boolean signature. shadPS4 and GPCS4 declare it without parameters.
  • No broadcast is ever on air, so both values return 0 and change nothing; sceGameLiveStreamingGetCurrentStatus2 keeps reporting no stream.
  • A call outside sceGameLiveStreamingInitialize / sceGameLiveStreamingTerminate throws std::logic_error. It reads the library's g_initialized under g_mutex, which #9137 added. The module's error for this call is not confirmed: #9137 returns 0x80A00004 from sceGameLiveStreamingTerminate and sceGameLiveStreamingGetCurrentStatus2, and fpPS4 defines SCE_GAME_LIVE_STREAMING_ERROR_NOT_INITIALIZED but never returns it from this call. Throwing follows libSceContentDelete. If the module confirms 0x80A00004 here, the throw becomes that return.
  • Debt: the "declared without parameters" entry is replaced by one that records the uninitialized case.

Overlap from pr_overlap.py, after merging main:

  • #9137 has landed. This call uses its initialization state, and the merge keeps #9137's lifecycle and error codes.
  • #9524 implements sixteen other calls of this library and conflicts in core/libs/tests/GuestGameLiveStreaming.cpp (declarations and test lines at the same places). Whichever lands second merges the other's lines. #9524 returns 0x80A00004 when not initialized from its calls, following sceGameLiveStreamingGetCurrentStatus2; if that is preferred for this call too, it is the one-line change above.
  • #9031 implements sceGameLiveStreamingGetProgramInfo and only shares neighbouring lines.
  • #9126, which expected this call to throw std::runtime_error, is closed.

Tested

Windows 11, WinLibs GCC 15.2.0, targeted build of libSceGameLiveStreaming and guest_game_live_streaming_tests, at 7372200418 (current main 4777caca34 merged in):

  • ctest --test-dir build -R guest_game_live_streaming -V: passes, 3 of 3 runs.
  • The extended test fails with main's library, on an uncaught sceGameLiveStreamingEnableLiveStreaming not implemented, and fails with the initialization check removed (3 of 3 runs each). Before the merge, it also failed with Initialize no longer setting the flag or Terminate no longer clearing it; that state is now #9137's.
  • Independent run by @xXPBSXx (comment) at the previous head b6f96055bf: Windows 10 Pro 19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7 (UCRT), Release. guest_game_live_streaming passes 3 of 3. With the merge base's Export.cpp and this pull request's test, it fails 3 of 3 (exit 0xc0000409).

Monopoly Plus (CUSA03312) on Windows 11 with an AMD RX 9070 XT, with this change on the PS4 bring-up branch. Before the change, the title stopped at sceGameLiveStreamingEnableLiveStreaming not implemented right after its language screen. With it, the title gets past that point and loads its main menu. The window was closed about 130 s in, and nothing stopped the title before that.

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

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4956319729 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9319). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-21T18:20:02Z. --- ### What Implements `sceGameLiveStreamingEnableLiveStreaming`, which #8114 only declared. - Signature: `int sceGameLiveStreamingEnableLiveStreaming(const bool isEnableLiveStreaming)`, from [Orbital's type database](https://github.com/AlexAltea/orbital/blob/cc408367da6a6ebbf5ac1ac559fefeadc73b2831/tools/ida/db_types.json#L810); [fpPS4](https://github.com/red-prig/fpPS4/blob/04cefd43e6fddd1ab033e7980cd356d14c964905/src/ps4_libscegamelivestreaming.pas#L111) has the same one-`Boolean` signature. shadPS4 and GPCS4 declare it without parameters. - No broadcast is ever on air, so both values return 0 and change nothing; `sceGameLiveStreamingGetCurrentStatus2` keeps reporting no stream. - A call outside `sceGameLiveStreamingInitialize` / `sceGameLiveStreamingTerminate` throws `std::logic_error`. It reads the library's `g_initialized` under `g_mutex`, which #9137 added. The module's error for this call is not confirmed: #9137 returns `0x80A00004` from `sceGameLiveStreamingTerminate` and `sceGameLiveStreamingGetCurrentStatus2`, and fpPS4 defines `SCE_GAME_LIVE_STREAMING_ERROR_NOT_INITIALIZED` but never returns it from this call. Throwing follows libSceContentDelete. If the module confirms `0x80A00004` here, the throw becomes that return. - Debt: the "declared without parameters" entry is replaced by one that records the uninitialized case. Overlap from `pr_overlap.py`, after merging `main`: - #9137 has landed. This call uses its initialization state, and the merge keeps #9137's lifecycle and error codes. - #9524 implements sixteen other calls of this library and conflicts in `core/libs/tests/GuestGameLiveStreaming.cpp` (declarations and test lines at the same places). Whichever lands second merges the other's lines. #9524 returns `0x80A00004` when not initialized from its calls, following `sceGameLiveStreamingGetCurrentStatus2`; if that is preferred for this call too, it is the one-line change above. - #9031 implements `sceGameLiveStreamingGetProgramInfo` and only shares neighbouring lines. - #9126, which expected this call to throw `std::runtime_error`, is closed. ### Tested Windows 11, WinLibs GCC 15.2.0, targeted build of `libSceGameLiveStreaming` and `guest_game_live_streaming_tests`, at `7372200418` (current `main` `4777caca34` merged in): - `ctest --test-dir build -R guest_game_live_streaming -V`: passes, 3 of 3 runs. - The extended test fails with `main`'s library, on an uncaught `sceGameLiveStreamingEnableLiveStreaming not implemented`, and fails with the initialization check removed (3 of 3 runs each). Before the merge, it also failed with Initialize no longer setting the flag or Terminate no longer clearing it; that state is now #9137's. - Independent run by @xXPBSXx ([comment](https://github.com/boykopovar/AnyPS5/pull/9319#issuecomment-6326086943)) at the previous head `b6f96055bf`: Windows 10 Pro 19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7 (UCRT), Release. `guest_game_live_streaming` passes 3 of 3. With the merge base's `Export.cpp` and this pull request's test, it fails 3 of 3 (exit `0xc0000409`). Monopoly Plus (CUSA03312) on Windows 11 with an AMD RX 9070 XT, with this change on the PS4 bring-up branch. Before the change, the title stopped at `sceGameLiveStreamingEnableLiveStreaming not implemented` right after its language screen. With it, the title gets past that point and loads its main menu. The window was closed about 130 s in, and nothing stopped the title before that. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [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: none - [x] Fixes: none - [x] Unblocks: CUSA03312 #7198 - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-21 18:20:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T18:20:48Z.


Progress report (4777cac → 7372200)

📈 System libraries: 43.24% (+0.01%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceGameLiveStreaming sceGameLiveStreamingEnableLiveStreaming
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6323329540 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9319#issuecomment-6323329540). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T18:20:48Z. --- <!-- progress-report --> ### Progress report (4777cac → 7372200) 📈 **System libraries**: 43.24% (+0.01%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceGameLiveStreaming | `sceGameLiveStreamingEnableLiveStreaming` | </details>
xXPBSXx commented 2026-10-21 20:41:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T20:41:24Z.


Independent Windows run of this PR (data only).

Environment: Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. Merge-tree of the PR head against main is clean. I built only guest_game_live_streaming_tests; ctest -N -R guest_game_live_streaming lists exactly one test.

PR head tested: b6f96055bf558fb3e156c359b389926e1f5ee3a7.

Results (3 runs each):

  • PR head: guest_game_live_streaming passes 3/3.
  • Baseline: I kept the PR's test and replaced only core/libs/prx/libSceGameLiveStreaming/Export.cpp with the version from the PR's merge base (b4d10586ef), then rebuilt. The test fails 3/3 (exit 0xc0000409). I restored the PR's files afterwards.

GPU: the run output has no Selected GPU line; no GPU claim is made.

Not run: other platforms, the other tests in the same family, the full repository CTest, and any title or console run.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6326086943 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9319#issuecomment-6326086943). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-21T20:41:24Z. --- Independent Windows run of this PR (data only). **Environment:** Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. Merge-tree of the PR head against `main` is clean. I built only `guest_game_live_streaming_tests`; `ctest -N -R guest_game_live_streaming` lists exactly one test. **PR head tested:** `b6f96055bf558fb3e156c359b389926e1f5ee3a7`. **Results (3 runs each):** - PR head: `guest_game_live_streaming` passes 3/3. - Baseline: I kept the PR's test and replaced only `core/libs/prx/libSceGameLiveStreaming/Export.cpp` with the version from the PR's merge base (`b4d10586ef`), then rebuilt. The test fails 3/3 (exit 0xc0000409). I restored the PR's files afterwards. **GPU:** the run output has no `Selected GPU` line; no GPU claim is made. **Not run:** other platforms, the other tests in the same family, the full repository CTest, and any title or console run. AI-assisted (Claude Code).
savvaniss commented 2026-10-22 10:56:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-22T10:56:42Z.


@xXPBSXx thank you for the independent Windows run and the baseline check. I've added it to Tested.

I merged current main (4777caca34) into the branch (7372200418). The conflict was with #9137, which added the library's initialization state and error codes. The merge keeps #9137's lifecycle and codes, and sceGameLiveStreamingEnableLiveStreaming now reads its g_initialized under g_mutex. It still throws when not initialized, since the module's code for this call is not confirmed. The extended test passes on the merged head and still fails with main's library and with the initialization check removed (3 of 3 runs each). check_conventions.py passes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6339052244 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9319#issuecomment-6339052244). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-22T10:56:42Z. --- @xXPBSXx thank you for the independent Windows run and the baseline check. I've added it to Tested. I merged current `main` (`4777caca34`) into the branch (`7372200418`). The conflict was with #9137, which added the library's initialization state and error codes. The merge keeps #9137's lifecycle and codes, and `sceGameLiveStreamingEnableLiveStreaming` now reads its `g_initialized` under `g_mutex`. It still throws when not initialized, since the module's code for this call is not confirmed. The extended test passes on the merged head and still fails with `main`'s library and with the initialization check removed (3 of 3 runs each). `check_conventions.py` passes.
MarcZX10 commented 2026-10-22 11:41:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:41:02Z.


The overlap report names #9524. I confirmed the pairwise merge conflicts in GuestGameLiveStreaming.cpp; the exported functions are separate. Please coordinate the landing order with #9524’s author, who has been asked to record any required Depends on link and preserve both test changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6339857539 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9319#issuecomment-6339857539). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T11:41:02Z. --- The overlap report names #9524. I confirmed the pairwise merge conflicts in `GuestGameLiveStreaming.cpp`; the exported functions are separate. Please coordinate the landing order with #9524’s author, who has been asked to record any required `Depends on` link and preserve both test changes.
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!9319
No description provided.