feat(libSceGameLiveStreaming): take the screen mode in ScreenSetMode #28903

Open
MertCtn wants to merge 1 commit from upstream-pr/28903 into main
MertCtn commented 2026-12-04 14:50:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MertCtn on 2026-12-04T14:50:57Z.


What

[DRAFT] Take the screen mode in sceGameLiveStreamingScreenSetMode.

Firmware 4.03 libSceGameLiveStreaming.sprx takes one int argument and returns 0x80A00002 unless it is 1 or 2, after the uninitialized 0x80A00004 gate. Declare the parameter, validate its range like the module, and assert both paths in the before-init test. The service tail still throws.

Tested

Windows 11, MSYS2 UCRT64 GCC 16.2.0. guest_game_live_streaming and guest_game_live_streaming_before_init pass; check_conventions.py reports 0 errors.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5648664371 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28903). Originally posted by [MertCtn](https://github.com/MertCtn) on 2026-12-04T14:50:57Z. --- ### What [DRAFT] Take the screen mode in sceGameLiveStreamingScreenSetMode. Firmware 4.03 libSceGameLiveStreaming.sprx takes one int argument and returns 0x80A00002 unless it is 1 or 2, after the uninitialized 0x80A00004 gate. Declare the parameter, validate its range like the module, and assert both paths in the before-init test. The service tail still throws. ### Tested Windows 11, MSYS2 UCRT64 GCC 16.2.0. `guest_game_live_streaming` and `guest_game_live_streaming_before_init` pass; `check_conventions.py` reports 0 errors. ### 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 and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical 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 - [ ] Depends on: none - [ ] Fixes: none - [ ] Unblocks: none - [ ] GPUs tested: n/a - [ ] AI-assisted: yes
MarcZX10 commented 2026-12-04 15:13:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-04T15:13:38Z.

Review: APPROVED


Reviewed — looks good

The change matches the stated contract: the function takes a mode, checks initialization before validating modes 1 and 2, and keeps valid initialized calls on the existing throwing path.

What I ran

Reviewed head 27cea79844bcae8a36409d0c9bbde1fa1b80063f using the pinned repo_read.py reader and the prepared review materials. No build or test was run; toolchain and merged-preview checks were not applicable.

python3 repo_read.py search sceGameLiveStreamingScreenSetMode
python3 repo_read.py cat core/libs/prx/libSceGameLiveStreaming/Export.cpp 124 140
python3 repo_read.py cat core/libs/prx/libSceGameLiveStreaming/include/Api.hpp 60 68
python3 repo_read.py cat core/libs/tests/GuestGameLiveStreamingBeforeInit.cpp 1 63
python3 repo_read.py cat docs/dev/debt/libSceGameLiveStreaming.md 1 40
python3 repo_read.py ls docs/dev/debt/changes

Results

Check Result Note
Source review passed Changed behavior and callers inspected
Tests and build not run Author reports tests; not independently run
Merged preview not applicable Not performed

Negative control

Not run; no test assertion was deliberately changed.

Findings

Blocking

None.

Non-blocking

None.

Sources

Not verified

The author's reported Windows test and convention-check results were not independently run. The firmware 4.03 disassembly claim and behavior on a physical console were not independently verified. Read all four files listed under reviewed in files.json: core/libs/prx/libSceGameLiveStreaming/Export.cpp, core/libs/prx/libSceGameLiveStreaming/include/Api.hpp, core/libs/tests/GuestGameLiveStreamingBeforeInit.cpp, and docs/dev/debt/changes/fix-gamelivestreaming-screen-set-mode.md. No files were excluded.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6191421533 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28903#pullrequestreview-6191421533). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-12-04T15:13:38Z. **Review:** APPROVED --- # Reviewed — looks good The change matches the stated contract: the function takes a mode, checks initialization before validating modes 1 and 2, and keeps valid initialized calls on the existing throwing path. ## What I ran Reviewed head `27cea79844bcae8a36409d0c9bbde1fa1b80063f` using the pinned `repo_read.py` reader and the prepared review materials. No build or test was run; toolchain and merged-preview checks were not applicable. ```text python3 repo_read.py search sceGameLiveStreamingScreenSetMode python3 repo_read.py cat core/libs/prx/libSceGameLiveStreaming/Export.cpp 124 140 python3 repo_read.py cat core/libs/prx/libSceGameLiveStreaming/include/Api.hpp 60 68 python3 repo_read.py cat core/libs/tests/GuestGameLiveStreamingBeforeInit.cpp 1 63 python3 repo_read.py cat docs/dev/debt/libSceGameLiveStreaming.md 1 40 python3 repo_read.py ls docs/dev/debt/changes ``` ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Changed behavior and callers inspected | | Tests and build | not run | Author reports tests; not independently run | | Merged preview | not applicable | Not performed | ## Negative control Not run; no test assertion was deliberately changed. ## Findings ### Blocking None. ### Non-blocking None. ## Sources - [Implementation at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/27cea79844bcae8a36409d0c9bbde1fa1b80063f/core/libs/prx/libSceGameLiveStreaming/Export.cpp#L132-L136) - [Before-init and mode-path assertions](https://github.com/boykopovar/AnyPS5/blob/27cea79844bcae8a36409d0c9bbde1fa1b80063f/core/libs/tests/GuestGameLiveStreamingBeforeInit.cpp#L50-L60) ## Not verified The author's reported Windows test and convention-check results were not independently run. The firmware 4.03 disassembly claim and behavior on a physical console were not independently verified. Read all four files listed under `reviewed` in `files.json`: `core/libs/prx/libSceGameLiveStreaming/Export.cpp`, `core/libs/prx/libSceGameLiveStreaming/include/Api.hpp`, `core/libs/tests/GuestGameLiveStreamingBeforeInit.cpp`, and `docs/dev/debt/changes/fix-gamelivestreaming-screen-set-mode.md`. No files were excluded. ## To get this to a good state Nothing is required.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/28903:upstream-pr/28903'
git switch 'upstream-pr/28903'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/28903'
git switch 'upstream-pr/28903'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/28903'
git switch 'upstream-pr/28903'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/28903'
git switch 'main'
git merge --squash 'upstream-pr/28903'
git switch 'main'
git merge --ff-only 'upstream-pr/28903'
git switch 'main'
git merge 'upstream-pr/28903'
git push origin 'main'
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!28903
No description provided.