feat(libSceErrorDialog): show error dialogs as host message boxes with ANYPS5_ERROR_DIALOG_HOST #17719

Open
MarcZX10 wants to merge 13 commits from upstream-pr/17719 into main
MarcZX10 commented 2026-11-09 12:30:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-09T12:30:58Z.


What

Extends the host message box of #17706 to error dialogs. With ANYPS5_ERROR_DIALOG_HOST=1, each error dialog that sceErrorDialogOpen opens is shown as a native host message box with the error's text, instead of the in-game dialog. The call waits until a button is pressed. If the box cannot be shown, the in-game dialog is used. Off by default; Apple builds always keep the in-game dialog.

The host box moves from libSceMsgDialog to libSceIme, next to the modal dialog it stands in for, and its namespace becomes HostBox. libSceErrorDialog already links libSceIme, so it needs no new link.

This PR is stacked on #17706: its first commits are that PR's. Merge #17706 first.

Commits: the message dialog host box split into moves (header, source and test to libSceIme), the rename, the error dialog include and switch, its answer path, its fallback log, the two docs rows, and the debt link fixes that the naming rule required.

Tested

Linux, built with ime_host_message_box_tests (moved), guest_msg_dialog, guest_error_dialog, msg_dialog_request and the libSceMsgDialog and libSceErrorDialog libraries; ctest passes 4/4.

  • The moved test covers the switch, the labels and the button mapping, as in #17706.
  • Not tested: the error box itself. No display was used, so no box was shown and no button was pressed. guest_error_dialog runs with the switch unset.

GPUs tested: n/a, no graphics code.

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: #17706
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a, no AGC or shader change
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5223893311 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17719). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-09T12:30:58Z. --- ### What Extends the host message box of #17706 to error dialogs. With `ANYPS5_ERROR_DIALOG_HOST=1`, each error dialog that `sceErrorDialogOpen` opens is shown as a native host message box with the error's text, instead of the in-game dialog. The call waits until a button is pressed. If the box cannot be shown, the in-game dialog is used. Off by default; Apple builds always keep the in-game dialog. The host box moves from libSceMsgDialog to libSceIme, next to the modal dialog it stands in for, and its namespace becomes `HostBox`. libSceErrorDialog already links libSceIme, so it needs no new link. This PR is stacked on #17706: its first commits are that PR's. Merge #17706 first. Commits: the message dialog host box split into moves (header, source and test to libSceIme), the rename, the error dialog include and switch, its answer path, its fallback log, the two docs rows, and the debt link fixes that the naming rule required. ### Tested Linux, built with `ime_host_message_box_tests` (moved), `guest_msg_dialog`, `guest_error_dialog`, `msg_dialog_request` and the `libSceMsgDialog` and `libSceErrorDialog` libraries; ctest passes 4/4. - The moved test covers the switch, the labels and the button mapping, as in #17706. - Not tested: the error box itself. No display was used, so no box was shown and no button was pressed. `guest_error_dialog` runs with the switch unset. GPUs tested: n/a, no graphics code. ### 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 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: #17706 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a, no AGC or shader change - [x] AI-assisted: yes
ligmaSec commented 2026-12-03 17:58:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T17:58:56Z.

Review: COMMENTED


The opt-in synchronous host popup holds g_lock across SDL_ShowMessageBox. While sceErrorDialogOpen waits for a button, that also blocks GetStatus, UpdateStatus, Close and Terminate on every guest thread. Can the synchronous wait release the state mutex and publish its result only if the same dialog is still current? That would let the lifecycle calls keep returning while the host window is open.

Source review at 9b00c4afee. The popup path is unverified in this review.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6175480118 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17719#pullrequestreview-6175480118). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T17:58:56Z. **Review:** COMMENTED --- The opt-in synchronous host popup holds `g_lock` across `SDL_ShowMessageBox`. While `sceErrorDialogOpen` waits for a button, that also blocks `GetStatus`, `UpdateStatus`, `Close` and `Terminate` on every guest thread. Can the synchronous wait release the state mutex and publish its result only if the same dialog is still current? That would let the lifecycle calls keep returning while the host window is open. Source review at `9b00c4afee`. The popup path is unverified in this review. AI-assisted: yes.
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/17719:upstream-pr/17719'
git switch 'upstream-pr/17719'

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