fix(libScePad): report the DualSense touchpad resolution #8138
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8138"
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 bl4nkTHEBUNKER on 2026-10-19T23:53:22Z.
What
scePadGetControllerInformationandscePadGetExtControllerInformationreported the touchpad as 1920 by 943: the DualShock 4 height with the DualSense pixel density. The library reports a DualSense to every title (scePadGetInfoanswersSCE_PAD_DEVICE_TYPE_DUAL_SENSE), so the touchpad is 1920 by 1080.Three places disagreed with each other:
PadInputA title that maps touch coordinates through the reported resolution lost the lower part of the touchpad and read every y compressed. The width and height now live beside the pad state as
kTouchPadWidthandkTouchPadHeight, and the controller information, the finger scaling and the virtual contacts all read them, so the three cannot drift apart again.Sources, both naming the same pair:
libScePad.dlland is already a source in the pad debt, reports 1920 by 1080 at 44.86 pixels per cm for a DualSense, against 1920 by 943 at 44 for a DualShock 4.DS_TOUCHPAD_WIDTH 1920andDS_TOUCHPAD_HEIGHT 1080for the DualSense, againstDS4_TOUCHPAD_HEIGHT 942in the same file.The pixel density 44.86 already matched duaLib's DualSense value and is unchanged. A DualShock 4 on the host now reports through the DualSense range as well, since the title is told it holds a DualSense; that and the unmeasured console values are in the technical debt.
Tested
Windows 11, GCC 16.2 (MSYS2 UCRT64),
core/libs/tests/GuestPad.cppextended and run againstlibScePad's sources with-Wall -Wextra(clean, test passes). New assertions: both controller information exports report 1920 by 1080 and 44.86, the invalid handle still returnsINVALID_HANDLE, and the keyboard touch contacts land on the quarter points and the centre line. The existing injected-touch assertions that held the 942 centre line now read the same constants. No title tested: no touch-driven title was run.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 github-actions[bot] on 2026-10-20T00:15:56Z.
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.
main)core/libs/tests/GuestPad.cppL7docs/dev/debt/libScePad.mdL162docs/dev/debt/libScePad.mdL162core/libs/prx/libScePad/Export.cppL81-84, L125-128core/libs/prx/libScePad/src/PadState.cppL205-206core/libs/prx/libSceVideoOut/src/PadInput.cppL195-196, L200core/libs/tests/GuestPad.cppL29-30, L319core/libs/tests/GuestPad.cppL30core/libs/tests/GuestPad.cppL30Some 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.
core/libs/prx/libSceVideoOut/src/PadInput.cppcore/libs/prx/libScePad/Export.cppdocs/dev/debt/libScePad.mdcore/libs/tests/GuestPad.cppcore/libs/prx/libSceVideoOut/src/PadInput.cppcore/libs/prx/libScePad/Export.cppcore/libs/prx/libScePad/include/PadState.hppcore/libs/prx/libScePad/src/PadState.cppcore/libs/prx/libSceVideoOut/src/PadInput.cppcore/libs/tests/GuestPad.cppdocs/dev/debt/libScePad.md