fix(libSceIme): return error codes instead of throwing on duplicate open or close #5856

Merged
ErenYeager1836 merged 2 commits from upstream-pr/5856 into main 2026-10-15 21:15:30 +00:00
ErenYeager1836 commented 2026-10-14 13:52:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ErenYeager1836 on 2026-10-14T13:52:57Z.


What

Return standard SCE error codes instead of throwing std::logic_error in sceImeKeyboardOpen (ErrorAlreadyOpened = 0x80bc0001) and sceImeKeyboardClose (ErrorNotOpened = 0x80bc0002). Cover duplicate opening and closing when not opened in guest tests.

Tested

Windows 11, guest IME keyboard tests.

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
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: no
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4858958966 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5856). Originally posted by [ErenYeager1836](https://github.com/ErenYeager1836) on 2026-10-14T13:52:57Z. --- ### What Return standard SCE error codes instead of throwing `std::logic_error` in `sceImeKeyboardOpen` (`ErrorAlreadyOpened = 0x80bc0001`) and `sceImeKeyboardClose` (`ErrorNotOpened = 0x80bc0002`). Cover duplicate opening and closing when not opened in guest tests. ### Tested Windows 11, guest IME keyboard tests. ### 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: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: no
github-actions[bot] commented 2026-10-15 12:10:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:10:33Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestImeKeyboard.cpp
PR 6447 core/libs/prx/libSceIme/Export.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6191720479 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5856#issuecomment-6191720479). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T12:10:33Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestImeKeyboard.cpp` | | [PR 6447](https://www.github.com/boykopovar/AnyPS5/pull/6447) | `core/libs/prx/libSceIme/Export.cpp` |
adriadam10 commented 2026-10-15 13:47:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T13:47:04Z.


Checked against KytyPS5 (ImeKeyboardOpen returns BUSY 0x80bc0001, ImeKeyboardClose returns NOT_OPENED 0x80bc0002); the new test checks fail without the change, and guest_ime_keyboard plus the rest of the libSceIme/libs ctest pass.

Added on your branch:

  • ErrorAlreadyOpened was a second name for the existing ErrorBusy (same value): reuse ErrorBusy.
  • A line in docs/dev/debt/libSceIme.md for the new return values (PS5 result unverified; per-user state here vs one keyboard in Kyty).

Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6193615087 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5856#issuecomment-6193615087). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-15T13:47:04Z. --- Checked against KytyPS5 (`ImeKeyboardOpen` returns BUSY `0x80bc0001`, `ImeKeyboardClose` returns NOT_OPENED `0x80bc0002`); the new test checks fail without the change, and `guest_ime_keyboard` plus the rest of the libSceIme/libs ctest pass. Added on your branch: - `ErrorAlreadyOpened` was a second name for the existing `ErrorBusy` (same value): reuse `ErrorBusy`. - A line in `docs/dev/debt/libSceIme.md` for the new return values (PS5 result unverified; per-user state here vs one keyboard in Kyty). Merging once CI is green.
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!5856
No description provided.