feat(libScePad): set the light bar from scePadSetLightBarForTracker #8260
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8260"
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 YossiYad on 2026-10-20T07:23:31Z.
What
scePadSetLightBarForTrackerthrew. It now takes(handle, const PadLightBarParam*)and does whatscePadSetLightBardoes:INVALID_HANDLEfor a handle that is not the open pad,INVALID_ARGfor a null colour, and otherwise it sets the light bar colour the controller output carries.The signature and the behaviour follow shadPS4 (PS4), which sets the light bar the same way (it does not check for a null colour). How the console combines this colour with the one the VR tracker picks is not measured; the debt entry says so in place of "unknown signature".
Tested
Current validation (2026-10-25): rebased onto main
16ff208dc3; rebuilt and passedguest_padon Bazzite 44. Conventions pass against upstream/main. The signature remains unverified against a PS5 system module.Linux (Fedora 44, GCC, Ninja,
-DBUILD_TESTING=ON), based onmain3fd1cc393b:guest_padpasses with a newCheckTrackerLightBar: a wrong handle and a null colour are refused without a new output, and a valid call publishes the colour throughPadFetchOutput_nid_postfix. It passed 10 of 10 runs, and fails when the call returns success without setting the colour.ctest: 1670 of 1675 pass. The 5 failures (application_heap_scripting,application_heap_lazy,agc_driver_bda_device,agc_driver_guest_memory_lifetime,agc_driver_tessellation) fail the same way onmainon this machine.tools/check_conventions.py --base upstream/mainpasses.tools/pr_overlap.pylists #5038, #6044 and #7881, which conflict withmainand share libScePad files; none of their diffs touches this function.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)Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-21T06:50:59Z.
Rebased onto current
main(headffe29512a,main7ce3b1df3). The only conflict was the declarations at the top ofGuestPad.cpp, wheremainaddedscePadGetControllerInformationandscePadGetExtControllerInformationat the same spot; I kept both.mainstill hasscePadSetLightBarForTrackeras a stub, and the added and removed lines match the previous head.guest_padpasses 3 of 3 here, andcheck_conventionshas no findings.Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-22T05:33:57Z.
Rebased onto
mainda54c652eafter #9137 (head8ef0f0f0e). It now usesmain's(std::int32_t handle, const PadLightBarParam* color)declaration, and the debt entry moved under the new "Unknown function info" layout.guest_padpasses 3 of 3.Imported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-24T15:38:04Z.
Review: COMMENTED
Checked against main
b607bfdc8band shadPS4 a808e76 (src/core/libraries/pad/pad.cpp):CheckControllerType(handle);and its libScePad.md entry at the same spots as this PR. All three are "keep both" conflicts, so a quick rebase should do it.iHuOWdvQVpgand the(handle, const PadLightBarParam*)signature match the cited shadPS4 code, and forwarding toscePadSetLightBarkeeps main's handle → null → special-handle order.pParam->r/g/bin its LOG_INFO (pad.cpp:599) before the handle check, so a null colour would crash there. Maybe "shadPS4 dereferences the colour before any check".Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.