Skip to content

feat(libSceSystemService): implement sceSystemServiceLaunchWebBrowser - #2070

Closed
inmert wants to merge 1 commit into
boykopovar:mainfrom
inmert:feat/systemservice-launch-web-browser
Closed

inmert wants to merge 1 commit into
boykopovar:mainfrom
inmert:feat/systemservice-launch-web-browser

Conversation

@inmert

@inmert inmert commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

What

ScreenTester5 (PPSA69420, Marice/ScreenTester5 01.000.000) imports sceSystemServiceLaunchWebBrowser (-+3hY+y8bNo), one of its nine absent imports in the #1578 audit. On main f145139, tools/import_audit.py on the relinked release lists it as the only absent libSceSystemService import; the other eight are libkernel (sysctl, sysctlbyname, sigaction, pthread_sigmask, sigaddset, sigemptyset, pthread_set_name_np, pthread_setcanceltype), each with an open PR.

The export opens the URI in the host's default browser and returns once the browser has started: ShellExecuteW on Windows, xdg-open on Linux, open on macOS.

Signature (const char* uri, const void* param). No reimplementation has a body for it: shadPS4 stubs it without parameters, OpenOrbis declares it void(), and KytyPS5, SharpProspero, sharpemu and fpPS4 don't have it. The public callers agree on two arguments and all pass a null param: CTurt's PS4 userland write-up (int (*)(const char *uri, void *), called with NULL), elf-launcher (sceSystemServiceLaunchWebBrowser("http://127.0.0.1:1000/", 0)) and stremio-ps4 (extern "C" int sceSystemServiceLaunchWebBrowser(const char *uri, void *param), called with NULL).

  • A null or empty URI returns SYSTEM_SERVICE_ERROR_PARAMETER, like the library's other argument checks.
  • A non-null param throws: its layout is unknown.
  • Only http and https URIs are handed to the host; another scheme throws, so a title can't hand the host shell a file path or an executable.
  • A host launch failure throws.

Recorded in TechnicalDebt: the console's error for a bad URI, whether the call waits for the browser, and the overlay status and events a title sees while the browser is up are unverified; sceSystemServiceGetStatus keeps reporting no overlay and no event is queued.

Refs #1578.

Tested

Windows 11 (10.0.26200), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=ON, RTX 3080.

  • guest_system_service now covers the null and empty URI, a non-null param, and ftp://, file://, scheme-less and http:/ URIs. It passes, and the six SystemService tests pass together.
  • Called the export of the built .prx from a small host program: https://example.com/ returned 0 and opened the default browser; ftp://example.com/ threw with the scheme message.
  • ScreenTester5 01.000.000 (the release ZIP) relinked with --windows --registry: tools/import_audit.py goes from 9 absent imports on main to 8 with this PR, and the patched libSceSystemService.prx exports -+3hY+y8bNo. The title doesn't start yet (the libkernel imports above), so the call is not reached on a title.
  • Full ctest with ANYPS5_REQUIRE_VULKAN=1 --parallel 4: 491 of 491 pass in 106 s, none over 30 s.
  • python tools/check_conventions.py --base origin/main passes.

Not built on Linux or macOS.

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: none
  • AI-assisted: yes

Open the URI in the host's default browser: ShellExecuteW on Windows,
xdg-open on Linux and open on macOS. The (uri, param) signature follows
the public homebrew callers, which all pass a null param; a non-null
param and a scheme other than http or https throw. A null or empty URI
returns SYSTEM_SERVICE_ERROR_PARAMETER.

PPSA69420 (ScreenTester5 01.000.000) imports it (#1578).
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

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
#2001 core/libs/tests/GuestSystemService.cpp L26-40
docs/dev/TechnicalDebt.md L198-204
#2065 core/libs/tests/GuestSystemService.cpp L29 sceSystemServiceLaunchWebBrowser

@inmert

inmert commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favour of #2065, which was opened a few minutes before this one and implements the same export.

One note for whoever settles the behaviour: this PR opened the URI in the host's default browser. A loopback page like RommPS's http://127.0.0.1:8780/... would still resolve under AnyPS5, since the title's own server runs on the host. If an error return is the preferred answer, #2065 covers it.

@inmert inmert closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant