Repository navigation
feat(pad): inject touch coordinates through command files - #11715
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed exact head 9ff5ae5cbb0606b4c032a806c6a8f34d226c3d86.
The optional touch token is bounded and rejected atomically on malformed or out-of-range input; the original button/stick grammar remains intact. The state path preserves a stable supplied contact ID during movement and treats an explicit inactive token as a lift that suppresses physical/synthetic contacts for that command. The tests cover those transitions, invalid tokens, expiry, and unchanged button/stick behavior. I checked the overlap candidates named in the PR: the open timeline, IME, path/error, and tracker-light-bar changes do not implement coordinate contacts; merged #7102 adds only left/right touchpad clicks, and closed #6485 covers physical sample IDs.
Independent checks: python3 -m unittest discover -s tools/tests -p test_pad_input.py -v passes 21/21; tools/check_conventions.py --base refs/review/upstream-main and git diff --check pass. I applied the PR patch in a disposable main-derived test tree, built guest_pad_tests, and ran ctest -R '^guest_pad$': 1/1 passed. The host lacks the required Zen 2 CPU features, so I bypassed only the startup guard in that scratch tree, then restored it and verified the scratch source is clean. All hosted relinker and ASan jobs pass; Linux/Windows product jobs were skipped by path policy. The separate Yōtei name-entry result remains historical integration evidence, not a new current-main game run.
No blocking issue found.
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
fa153a8 to
0701378
Compare
|
Rebased onto current |
What
Allow the existing pad command file to inject an explicit touch contact, including coordinates, stable contact ID, movement and release. Button-only, stick and timeline commands keep their existing syntax. An optional final
touch(X,Y,ID,ACTIVE)token accepts X 0..1919, Y 0..942, ID 0..127 and ACTIVE 0/1; malformed or out-of-range commands are rejected without consuming a sequence.tools/pad_input.pygains--touch X Y ID ACTIVEand recognizes the extended command when advancing its sequence. It retains atomic replacement, file mode/owner handling and the existing line-size bound. While a coordinate command is active it overrides physical touch contacts and the left/right synthetic contact, including when ACTIVE=0; physical contact tracking continues so it resumes correctly afterward. Buttons and sticks still combine through the existing path.For example, on a command file already configured through
APS5_PAD_INPUT_FILE:This supplies the missing coordinate movement needed for the name-writing sequence in Ghost of Yōtei; the original implementation completed that sequence on the custom Linux integration reported in #675. This PR is a standalone port to main, not that combined graphics stack. Related #7102 covers left/right touchpad clicks, and #6485 concerns physical sample IDs; neither implements this command form. No FPS claim.
Tested
Fedora/Linux x86-64, GCC, Ryzen 7 5700X:
GuestPad.cppfixture passed on base main0a570f617d85c0a560f6f6c9edea4954670ab629and passed with this change, including parser validation, coordinate movement with the same ID, explicit lift, command expiry, unchanged buttons/sticks and the existing pad API checks. The fixture sequence for the following queue-timestamp test was advanced to avoid replaying a stale sequence consumed by the new touch checks.libScePad/Export.cppandPadState.cppwere compiled into separate unpatched base/candidate PRX modules with the corresponding main/candidateGuestPad.cpp. Both use the same existing locally built libkernel/libc dependencies. This is a focused module/fixture build, not a fresh full-project build of all dependencies. No production source or binary in the working game checkout was replaced.python3 -m unittest discover -s tools/tests -p test_pad_input.py -v: 21 tests run, 20 passed and one skipped because privileged POSIX ownership behavior requires root.git diff --checkand code review passed.The branch was then rebased onto main
2e85f47aef524d294148e474718a1210df1476c8; only an unrelated libc ElfTypes header changed between the tested base and that rebase. The Pad sources and five changed files were unchanged upstream.Overlap review: the repository tool reports line conflicts with #10578 (timeline sequence validation) and #11207 (IME input interception), plus shared-file conflicts for #6531, #8260, #10206 and #11360. Their patches were inspected: none implements coordinate contacts. These are merge/rebase concerns, not feature prerequisites. If the IME interception patch lands first, this new contact input must also obey its interception flag when resolving that conflict. The other shared patches cover path/encoding/error handling and tracker-light-bar tests.
The current-main port has not been tested in a new native Yōtei run, on Windows or with a physical touchpad. The earlier name-writing result belongs to the separate integration; it is not presented as a fresh main game test. No AGC, shader recompiler or VideoOut code changes.
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)