Repository navigation
Conversation
…s once Twenty-two dialog libraries each defined the common dialog status and error codes in an anonymous namespace of their own Export.cpp. They disagreed on one value and spelled a second one two ways. The codes now live once in CommonDialog.hpp, which every dialog library already reaches, and the private copies are gone. COMMON_DIALOG_ERROR_BUSY is 0x80B80008. Thirteen libraries returned 0x80B80007 for it, which shadPS4's commondialog.h lists as RESULT_NONE; libSceInvitationDialog already returned 0x80B80008 (boykopovar#11379), and firmware 13.42 returns 0x80B80008 from Initialize while another common dialog is in use, the reading recorded in docs/dev/debt/libScePlayerInvitationDialog.md. What a busy Open returns is still not measured on a PS5. libSceMsgDialog's private kErrBusy took the same value and is renamed to the shared name. COMMON_DIALOG_ERROR_PARAMETER in libSceWebBrowserDialog is the same 0x80B8000A as COMMON_DIALOG_ERROR_INVALID_ARGUMENT and is folded into it. libScePlayGoDialog's unprefixed ERROR_INVALID_STATE keeps 0x80B80007 and is recorded as the remaining busy spelling in docs/dev/debt/libSceCommonDialog.md. The two guest tests that pinned 0x80B80007 for busy move to 0x80B80008. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
WardenPro
force-pushed
the
refactor/libSceCommonDialog-shared-codes
branch
from
November 6, 2026 10:41
280a2fa to
79ce982
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Twenty-two dialog libraries each defined the common dialog status and error codes in an anonymous namespace of their own
Export.cpp. They now live once inCommonDialog.hpp, which every one of those files already reaches, and the private copies are gone. The change is almost entirely deletions: 22 libraries, 38 insertions against 222 deletions.It has to be all twenty-two at once. Adding a name to
CommonDialog.hppmakes an unqualified reference to it ambiguous in any translation unit that still defines its own copy, because an anonymous-namespace name at namespace scope is visible through the enclosing namespace. A staged migration — the shared header plus a couple of libraries — does not compile, and the first run of this PR failed exactly that way onlibSceNetCtlApDialog.COMMON_DIALOG_ERROR_BUSYis0x80B80008. Thirteen libraries returned0x80B80007for it, which shadPS4'scommondialog.hlists asRESULT_NONE, so they most likely returned the result-none code where they meant busy. Three sources agree on0x80B80008: that same shadPS4 header,libSceInvitationDialogwhich already returned it (boykopovar#11379), and firmware 13.42, which returns0x80B80008fromInitializewhile another common dialog is in use — the reading recorded indocs/dev/debt/libScePlayerInvitationDialog.md. What a busyOpenreturns is still not measured on a PS5, anddocs/dev/debt/libSceCommonDialog.mdsays so.Two other disagreements go with it.
libSceWebBrowserDialog'sCOMMON_DIALOG_ERROR_PARAMETERis the same0x80B8000AasCOMMON_DIALOG_ERROR_INVALID_ARGUMENTand is folded into it; I kept the majority spelling rather than renaming eight libraries to shadPS4'sPARAM_INVALID.libSceMsgDialog's privatekErrBusyis renamed to the sharedCOMMON_DIALOG_ERROR_BUSY.libScePlayGoDialogstill returns0x80B80007fromscePlayGoDialogOpenunder the unprefixed nameERROR_INVALID_STATE; it is a different name and outside this dedup, so it is recorded in the debt entry as the remaining busy spelling rather than changed here.The two guest tests that pinned
0x80B80007for busy move to0x80B80008:GuestUsbStorageDialog.cppandGuestMsgDialog.cpp.GuestInvitationDialog.cppalready pinned0x80B80008and is untouched. No other test asserts a dialog code.Tested
macOS 27.2, Apple M4, AppleClang 21. Branch based on
WardenPro/AnyPS5:maine509b2924.python3 tools/check_conventions.py --base origin/main→All conventions checks passed.cmake -S . -B build-relinker -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON,cmake --build build-relinker --parallel 6,ctest --test-dir build-relinker --output-on-failure -j4→ 702 of 702 tests passed, 89.96 s. This build does not compilecore/libs/prx, so it does not cover the change itself.clang++ -std=c++20 -fsyntax-only -I core/libs -I coreon every changed translation unit — all 24.cppfiles in the diff → exit 0, no errors, on each. This is not the project's build, but it is what catches the ambiguity above, and it is why the second revision passes locally.python3 tools/pr_overlap.py --branch refactor/libSceCommonDialog-shared-codes --repo boykopovar/AnyPS5→ five open pull requests share a file with this branch; they are named underDepends onbelow.CI on this revision:
conventionspassed,library-portability(Emscripten, which compiles every library) passed in 1 m 28 s, andreportpassed. Thewindowsjob did not fail — it was cancelled by its owntimeout-minutes: 45after 45 m 17 s, still inside "Build and run changed guest core/libs tests". That is a budget limit, not a defect: touchingCommonDialog.hpprebuilds every dialog library and its test executables, this fork had never run CI before so no ccache exists to warm, and the runner builds with--parallel 3. The full build is not available on a pull request at all:build.ymlsetsfull = manual && ..., solinux,relinker,relinker-asan,register-context,write-watchandedge-watchare skipped on every PR run by design.The previous revision, which took the staged shape, ran
conventionsgreen and failedwindowson the ambiguity described above.Not run: the guest library tests under Linux x86-64, and the full build.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)docs/dev/debt/libSceCommonDialog.md), feat(libSceMsgDialog): add validation to progress bar updates boykopovar/AnyPS5#15367 (libSceMsgDialogandGuestMsgDialog.cpp), fix(libSceWebBrowserDialog): return ARG_NULL from result and cookie operations for unwritable pointers boykopovar/AnyPS5#16049 (libSceWebBrowserDialog), fix(libSceUsbStorageDialog): validate guest parameters readability in sceUsbStorageDialogOpen boykopovar/AnyPS5#16051 (libSceUsbStorageDialogandGuestUsbStorageDialog.cpp). Each of those edits function bodies, not the constant blocks this PR removes, so the hunks should not collide textually.