fix(pad): return INVALID_HANDLE from scePadReadState for an unknown handle #890
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/890"
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 alfalfa-star on 2026-10-06T13:10:43Z.
What
Return
PAD_ERROR_INVALID_HANDLE(0x80920003) fromscePadReadStatefor a handle that is not open, instead of throwinginvalid argument.PPSA14632 (LEGO Horizon Adventures, Unreal Engine) opens one pad with
scePadOpen(0x10000000, 0, 0, NULL)(handle 1) and then callsscePadReadState(eboot 0x4593a8) for that pad and for a second pad slot it never opened, whose handle is still 0. The title skips only negative handles before the call and does not check the result. Onmainthe second call throws. The other functions inlibScePadalready returnPAD_ERROR_INVALID_HANDLEfor an unknown handle, and shadPS4'sscePadRead(which itsscePadReadStatecalls) does the same.scePadReadpasses the error on. A nulldatastill throws.Tested
guest_padnow checks handle 0 and an unopened handle withscePadReadStateandscePadRead, and a read of the open handle; it fails onmain. Full ctest: 359/359.CFG shared merge splitting exceeded budget), which is unrelated.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