fix(pad): report special ports as not connected in scePadOpen #3838
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3838"
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 gookie-dev on 2026-10-11T17:40:30Z.
What
scePadOpenreturned the standard pad's handle for a special port (type 2) as well, andscePadGetHandlefound it there. Both ports then read the same input queue, so a press queued between two frames could be drained by the special port'sscePadReadand never reach the standard port.PPSA16827 (Harmony's Odyssey) opens both ports for the initial user and, every frame, reads both and polls
scePadGetControllerInformationandscePadDeviceClassParseDatafor the special one.Special ports now return
DEVICE_NOT_CONNECTED(0x80920007) fromscePadOpen, asscePadOpenExtalready does because the host has no special controller, andscePadGetHandlehas no handle for them. The existing TechnicalDebt entry forscePadOpenExtnow covers both calls (console behaviour for a disconnected special port is unknown).Tested
Ubuntu 24.04, GCC 13.3, Release.
guest_padopens a special port before and after the standard one and expectsDEVICE_NOT_CONNECTED, andDEVICE_NO_HANDLEfromscePadGetHandlefor the special port while the standard handle stays valid. It aborts onmainand passes with this change.--to-intel), 130 s on its title screen, pad calls traced under gdb: 6812scePadRead, 3408scePadGetControllerInformationand 3406scePadDeviceClassParseDatabefore (two reads of the same queue per frame); 2702 reads, 1 information call and no parse calls after.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)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T22:09:00Z.
Checked on the PR merged onto main:
guest_padand the libScePad/libs ctest scope pass (20/20), and the newguest_padchecks fail without theExport.cppchange. The TechnicalDebt entry covers both calls; merging.