Repository navigation
feat(libSceImeDialog): take the dialog's text from the host keyboard - #6504
Conversation
sceImeDialogInit wrote "Slayer" into an empty text buffer and the dialog finished on the second status poll, so a title never got text from the user: ProsperoRadio's search typed "Slayer" by itself and found no station. The dialog now runs until the user answers on the host keyboard, the way boykopovar#4756 made sceImeOpen's panel-less IME take it. While no IME panel is open, libSceIme hands the game window's text and editing keys to a sink that the dialog registers. Typing edits the text up to maxTextLength without splitting a surrogate pair, Enter writes it to the title's buffer and finishes with end status 0, and Escape finishes with 1. Abort still finishes with 2. A second Init reports busy, and a null parameter or buffer or a maximum length outside 1 to 2048 is refused, as in shadPS4. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Cross-validation on Windows 11 Pro 26220, NVIDIA RTX 4070 (596.21), MinGW GCC 15.2, PR head
One question: 24 titles in my local set import Written with Claude Code assistance (validation by a subagent, reviewed in this session). |
|
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.
|
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,
mainfa9365c (rebased onto 03c4cb5 afterwards, 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; test(agc): align the indirect arguments block at run time #6452 and fix(agc): allocate indirect arguments test block dynamically on Windows #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
main03c4cb5:CMakeLists.txton thatmain,guest_ime_dialogaborts;agc_*tests andguest_socket_read_write) fail the same way on plainmain03c4cb5 in this setup.git merge-tree: merges cleanly withmainand with the two open pull requests that touchlibSceIme/Export.cpp(fix(libSceIme): return error codes instead of throwing on duplicate open or close #5856, fix: complete compatibility gaps #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