Repository navigation
feat(libSceIme): open a panel-less IME fed by the host keyboard - #4756
Conversation
3055e55 to
f6f4914
Compare
|
Windows test: head AI-assisted (Claude Code). |
|
This needs a run of PPSA19639 on this head: does entering a world get past The Windows test above ran |
|
I don't have PPSA19639 to run, so I can't show it here. @ddrsilva, you reported the |
|
Linux verification of exact PR head
This covers the missing Linux build/test evidence and the keyboard-to-pad capture logic. I have not run PPSA19639 or verified its acceptance of the event IDs/payloads; that title check remains outstanding. |
|
Checked the build and ctest for libSceIme/libSceVideoOut on the merge with main ( |
|
Tested the IME implementation from head The functional checks passed in my isolated integrated Minecraft build:
Scope: this was not a build/run of the entire unmodified PR head. I used the PR's |
|
Since the Windows CI job only runs on push or manual dispatch, here is a local Windows run: Windows 11, MinGW-w64 GCC 15 (winlibs), Ninja, Release. I built head |
|
#4704 moved the keyboard and mouse handling in |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f6f4914 to
435be99
Compare
|
Rebased onto |
|
Checked the build and ctest for libSceIme/libSceVideoOut on the merge with main ( |
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 #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>
What
sceImeOpenthrew, so Minecraft Preview (PPSA19639) stopped when entering a world (#1277; the bring-up post worked around it locally by returning an error). This PR implements the IME as a session without a panel, with the text typed on the host keyboard:sceImeOpenvalidates the parameters, takes the initial text frominputTextBuffer, places the caret after it and queues the Open event (position andsceImeGetPanelSizesize). Edits keepinputTextBufferand a copy inworkin sync and queue UpdateText (one edit area: position and change in UTF-16 units) or UpdateCaret (one per UTF-16 unit). Enter sends PressEnter (or inserts a line break with the multiline option); Escape sends PressClose.sceImeUpdate(handler)delivers the queue with theargfromsceImeOpenwhen given the handler passed to it, outside the lock, so a handler may callsceImeClose.sceImeSetText,sceImeSetCaret,sceImeSetTextGeometry,sceImeGetPanelPositionAndFormandsceImeClosework while a panel is open. Typed text is cut tomaxTextLengthwithout splitting a surrogate pair.ImeTextInputforwards SDL text input (already enabled by SDL on desktop, so host keyboard layouts and host IMEs work) and Backspace, Delete, Left, Right, Home, End, Enter and Escape from the game window. While a panel is open, key presses no longer reach the keyboard-to-pad bindings, as the console's panel takes the controller; releases still do, so no button sticks.EventHandlergetsAPS5_VABI, since it is a guest function now called from host code.Event ids, caret directions, payload layout and error codes follow the PS4 reimplementation in shadPS4
ime.cpp; its SDK-version-dependent masks are not applied. A text filter or external keyboard filter throws (contract unknown). The panel-less behaviour is listed under Silent stubs and every assumption is recorded indocs/dev/debt/libSceIme.md.New
guest_ime_opencovers everysceImeOpenerror, the Open event and handlerarg, delivery only to the opening handler, insertion with UTF-8 to UTF-16 conversion and surrogate pairs, the length limit, Backspace/Delete/caret moves at the edges,SetText/SetCaret, Enter and Escape, the multiline option, a close from inside the handler dropping the remaining events, and the SDL event translation (window filter, key repeats, key-up). Removing the surrogate guard, offsetting the Backspace edit index or dropping the handler check each make it fail.Tested
Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7),
BUILD_TESTING=ON:guest_ime_open,guest_ime_parametersandguest_ime_keyboardpass;libSceVideoOutbuilds.python tools/check_conventions.py --base origin/mainandtools/check_test_registration.pypass. Not tested in Minecraft (no copy here) and the pad suppression is not covered by a test, sincePadInputneeds an SDL window.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