feat(libSceImeDialog): take the dialog's text from the host keyboard #6504
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6504"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by 0xRickx on 2026-10-15T17:55:26Z.
What
sceImeDialogInitwrites "Slayer" into an empty text buffer, and the dialog finishes on its second status poll (Export.cpp). A title that asks the user for text never gets any: it gets "Slayer", or its own text back, at once. 26 titles of the homebrew catalog import the dialog, for search boxes, server addresses and sign-in names.ProsperoRadio (PPSA99001) opens it for its station search and searches whatever comes back (
search_screen.cpp,radio_ime.cpp). Onmainits search field fills itself with "Slayer" and no station matches:The dialog now runs until the user answers on the host keyboard, the way #4756 made
sceImeOpen's panel-less IME take its text:ImePublishInput, fed by the game window'sImeTextInput) hands the text and editing keys to a sink that the dialog registers while no IME panel is open.ImeCapturesKeyboardstays true while the dialog runs, so the keys do not also act as pad buttons.maxTextLengthwithout splitting a surrogate pair, assceImeOpendoes, and Backspace, Delete, Left, Right, Home and End edit it. Enter writes the text to the title's buffer and finishes with end status 0. Escape finishes with 1 (user canceled) and leaves the buffer as it was.sceImeDialogAbortstill finishes with 2.sceImeDialogInitreports busy (0x80bc0001) while a dialog is open, and refuses a null parameter (0x80bc0031), a maximum length outside 1 to 2048 (0x80bc0016) and a null buffer (0x80bc0017), as shadPS4 does (ime_dialog.cpp, parameters, length).No dialog is drawn, as with
sceImeOpen: the text is typed without a panel and reaches the title when Enter accepts it. That, and where the error codes still differ from shadPS4, are recorded in the newdocs/dev/debt/libSceImeDialog.md. A title that relied on the "Slayer" text to get past a name entry now waits for the player, as it does on the console.Tested
Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release,
mainfa9365ca(rebased onto03c4cb5eafterwards, no conflicts):New
guest_ime_dialogtest. It sends SDL text and key events throughImeTextInput, the game window's path:Initreports busy, andGetResultrefuses before the end;maxTextLengthan emoji that does not fit whole is dropped and "98" is cut to "9";With
main's libSceImeDialog and libSceIme it aborts (the dialog finishes on the second poll); with the change it passes.guest_ime_open,guest_ime_keyboard,guest_ime_parameters,keyboard_inputandpatched_librariespass; the patched libSceImeDialog resolves its import from libSceIme.tools/check_conventions.py --base upstream/mainpasses.maindoes not build fully on Windows right now (an AGC test asks for a 64 KiB alignment that MinGW's object format refuses; #6452 and #6478 fix it), so I built the libraries and these tests instead of the full suite.ProsperoRadio (PPSA99001, catalog 01.000.010), relinked with this
main, driven with its scripted-test hook (triangle opens the search screen, cross opens the dialog) and captured withAPS5_DUMP_FRAMES, with a local catalogue of three stations (Rock Classics, Jazz Lounge, News 24). The image above is frame 12 of each run:main: the field fills itself with "Slayer": "0 stations", "No stations match".ImeTextInput.Linux (Ubuntu 24.04 in WSL, GCC 13.3, Release, the CI's configure options, lavapipe), merged onto
main03c4cb5e:CMakeLists.txton thatmain,guest_ime_dialogaborts;agc_*tests andguest_socket_read_write) fail the same way on plainmain03c4cb5ein this setup.git merge-tree: merges cleanly withmainand with the two open pull requests that touchlibSceIme/Export.cpp(#5856, #6447).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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-16T08:28:33Z.
Cross-validation on Windows 11 Pro 26220, NVIDIA RTX 4070 (596.21), MinGW GCC 15.2, PR head
6c5686d7emerged on main5d9dcc42d(together with #6507, no overlap, no conflicts):alignasAGC test fails (#6452/#6478); the libs build cleanly.guest_ime_dialog,guest_ime_open,guest_ime_keyboard,guest_ime_parameters,keyboard_input,patched_libraries,--repeat until-fail:3: all pass.guest_ime_dialog_testsrun against main's libSceIme/libSceImeDialog aborts 3 of 3 (the old two-poll finish); against the PR's libs it passes 3 of 3. (Test binary against main's libraries, not a source revert.)tools/check_conventions.py --base origin/mainandgit diff --check: pass. No PS5 export is added; the built libs gain only host-side names (ImeSetHostTextSink_nid_no_patchin libSceIme, one incidental mangledstd::u16stringsymbol in libSceImeDialog).dev/request.txthook: triangle opens the search screen, cross opens the dialog), 120 s: onmainthe search field fills itself with "Slayer" (0 stations · Slayer); with this PR the field stays empty with its placeholder while the dialog waits, 5536 frames, no stop line. Reproduced in a second run. The catalogue was empty on my side (Radio Browser unreachable from the harness), so I only compared the field, not station results.WM_CHAR/Enter to the window had no effect, and I did not use realSendInputon a shared desktop. The unit test's SDL events are the only evidence for the typed-text path.One question: 24 titles in my local set import
sceImeDialogInit. With a gamepad only, the dialog can no longer finish (main finishes it after two polls), so a title that opens it and waits for the answer blocks until a key reaches the window. Is that intended, or should a pad button cancel it? I ran only PPSA99001.Written with Claude Code assistance (validation by a subagent, reviewed in this session).
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T01:32:01Z.
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.
core/libs/prx/libSceIme/Export.cpp