fix(libScePad): queue input states for scePadRead #1076
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1076"
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 TideOPL on 2026-10-07T09:16:00Z.
What
scePadReadreported only the current pad state and always returned 1, so input that changed and changed back between two reads (a quick tap) was lost.PadPublishInputis queued (up to 64, oldest dropped).scePadReaddrains up tonumentries oldest first, each with its own timestamp, and returns the count. With nothing queued it writes the current state and returns 1, as before.scePadReadStateis unchanged. ThescePadReadentry in TechnicalDebt added earlier in this PR is removed.New test:
CheckReadQueueinguest_pad(press and release between two reads must both be reported).Tested
ctest, 386/387 pass. The one failure,agc_driver_scalar_sop1(movrelsd_2_b32 s13 is 0x00007fff, expected 0xd4cbd76d), fails identically onmainwithout these changes.39463913(merged into currentmain):linuxandwindowspass, includingguest_pad, without theTime.cppfix from #1501.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T03:25:32Z.
Could you split the
Time.cppfix into its own PR? It's a real bug with its own test and can go in on its own. ThescePadReadqueue changes library behaviour, so that part needs a title that loses input on main.Imported from boykopovar/AnyPS5. Originally posted by TideOPL on 2026-10-08T10:07:28Z.
Done: the
Time.cppfix and its tests are now in #1501. #1076 is just thescePadReadqueue and depends on #1501 sinceguest_padneeds the fix. I'll look for a title that loses input on main for the pad part.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T22:15:25Z.
Review: CHANGES_REQUESTED
Checked on Linux (merged onto current
main): build clean, full ctest green,guest_padpasses, and fails with the library changes reverted (test kept). Behaviour matches KytyPS5PadReadand shadPS4scePadRead, which both return queued states (oldest first) and fall back to one current state when none are queued, so I consider Dean's request for a title satisfied by those references.guest_padtest relies on thesceKernelGetProcessTimefix (you report it fails on Windows/GCC 15 without it). Please keep this PR as is and rebase once #1501 is merged; it can be merged right after.Imported from boykopovar/AnyPS5. Originally posted by TideOPL on 2026-10-09T22:32:29Z.
Thanks for checking this, and for accepting the KytyPS5/shadPS4 references.
This PR no longer depends on #1501. Since
39463913, queued states keep their own timestamps, but orientation is fused once at read time, the same wayscePadReadStatedoes it. A wrapped firstsceKernelGetProcessTimevalue then no longer stops tilt correction, which is what brokeguest_pad.CI on
39463913, merged into currentmain, is green on bothlinuxandwindowswithout theTime.cppfix. Locally, merged ontomain: Windows 479/479, Linux 485 pass (24 GPU tests skipped under WSL). I've updated the description toDepends on: none.So this can go in on its own, before or after #1501. Could you take another look?
Imported from boykopovar/AnyPS5. Originally posted by spiicez21 on 2026-10-10T03:35:53Z.
Checked on Windows 11 with WinLibs GCC 16.2.0 (UCRT, posix-seh), Release,
39463913merged onto currentmain(c963432d):guest_pad_testsbuilds.ctest -R '^guest_pad$': passed 3/3 runs (~0.33 s).libScePadchanges reverted (Export.cpp,PadState.hpp,PadState.cppfrommain) and the new test kept,guest_padfails (abort,0xc0000409), so the test covers the change.#1501 is now merged into
main, so the blocker in the review no longer applies. Full ctest not run; GCC 16.2 instead of the documented 15.2.0.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T08:49:42Z.
Review: APPROVED
Rechecked on the current head (
39463913) merged ontomain: builds clean,guest_padand the libs/libScePad ctests pass, andguest_padfails with the library changes reverted (test kept). TheTime.cppdependency is gone (read-time orientation fusion) and #1501 is merged, so the earlier blocker no longer applies. Behaviour (oldest-first drain, one current state when the queue is empty) matches KytyPS5PadReadand shadPS4scePadRead. CI linux and windows are green; merging.