Commit Graph
117 Commits
Author SHA1 Message Date
JJenkxandClaude Opus 5.5 36bffbab1e fix(libScePad): check only the selected triggers' modes in scePadSetTriggerEffect
The trigger mask selects which of the two commands apply, but every mode
was checked against the range, so an unselected command with any value
made the call fail. Quake (PPSA01880) and Quake II (PPSA09477) set only
the right trigger (mask 0x2) and leave the left command uninitialised
(mode 0xb65951b8 in one call), and got SCE_PAD_ERROR_INVALID_ARG; the
right trigger was never switched. Only selected commands are checked now.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 08:19:26 -05:00
Dean f4489e210f Merge pull request #14689 from slopgobblercobbler/test/pad-touchpad-data-null-bounds
test(libScePad): cover null pointer in scePadGetTouchData
2026-11-03 11:41:57 +13:00
Dean a7379cfdc6 Merge pull request #14657 from slopgobblercobbler/test/pad-get-handle-user-bounds
test(libScePad): cover invalid user ID in scePadGetHandle
2026-11-03 11:41:09 +13:00
Dean 90cf0ee6be Merge pull request #14640 from slopgobblercobbler/test/pad-motion-data-null-bounds
test(libScePad): cover invalid handle and null pointer in scePadGetMotionData
2026-11-03 11:40:53 +13:00
Dean 4534a41a68 Merge pull request #14593 from slopgobblercobbler/test/pad-set-vibration-bounds
test(libScePad): cover invalid handle in scePadSetVibration
2026-11-03 11:40:00 +13:00
Dean a38eae455a Merge pull request #14468 from slopgobblercobbler/test/pad-trigger-effects-coverage
test(libScePad): cover invalid handle and mode rejection in scePadSetTriggerEffect
2026-11-03 11:37:18 +13:00
Dean eecb6dee58 Merge pull request #10935 from mashingaan/fix/pad-open-unsupported-types
fix(libScePad): return an error for unsupported port probes
2026-11-03 08:45:10 +13:00
slopgobblercobbler ac3fb86b25 test(libScePad): cover null pointer in scePadGetTouchData 2026-11-01 18:03:32 +01:00
slopgobblercobbler 85b7c066c3 test(libScePad): cover invalid user ID in scePadGetHandle 2026-11-01 17:47:18 +01:00
slopgobblercobbler 84fcf9c7c0 test(libScePad): cover invalid handle and null pointer in scePadGetMotionData 2026-11-01 17:44:19 +01:00
slopgobblercobbler ba46471494 test(libScePad): cover invalid handle in scePadSetVibration 2026-11-01 17:13:23 +01:00
slopgobblercobbler 824ab2d36e test(libScePad): cover invalid handle and mode rejection in scePadSetTriggerEffect 2026-11-01 15:47:08 +01:00
Dean Galvin c4b304d1ba Merge commit 'd5ec8e6575be37f4340ded9c64c51b1d07076b51' into HEAD
# Conflicts:
#	core/libs/tests/GuestPad.cpp
2026-11-01 23:40:56 +13:00
mashingaan e11a4735a2 fix(pad): return error for unsupported port probes 2026-11-01 10:29:16 +03:00
MarcZX10 68a4689e62 Merge remote-tracking branch 'upstream/main' into fix/pad-port0-connected-state 2026-10-30 23:46:32 +00:00
Adrià ce03377e23 Merge pull request #13460 from BunnyFl/feat/libscepad-handle-queries
feat(libScePad): answer the motion, Bluetooth and Leonardo queries
2026-10-30 22:27:17 +01:00
BunnyFlandClaude Opus 5.5 708cf647d1 test(libScePad): check the five queries before scePadInit
Firmware 13.42 checks the initialized flag first in all five and
returns 0x80920005 without writing the outputs. The debt entry now
says where the behaviour comes from.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 17:57:01 +01:00
slopgobblercobbler 059b29ac24 test(libScePad): cover motion sensor, tilt correction, and orientation reset handle setters 2026-10-30 16:55:43 +01:00
BunnyFlandClaude Opus 5.5 2f9581050c feat(libScePad): answer the motion, Bluetooth and Leonardo queries
scePadGetMotionTimerUnit, scePadGetMotionSensorPosition,
scePadGetSphereRadius, scePadGetBluetoothAddress and
scePadParseUniqueDataLeonardo follow firmware 13.42's handle and
device checks for the one DualSense this library reports.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 16:48:37 +01:00
MarcZX10 c2f6b9b641 test(libScePad): check controller information and pad info for a withdrawn port 0
Covers scePadGetControllerInformation on a withdrawn port 0 (not connected,
connectedCount 0) and scePadGetInfo, whose connected count must match the
ports Pad::IsConnected reports, with no entry when none is connected.
2026-10-30 13:53:55 +00:00
MarcZX10 f30b56225c test(libScePad): check that a withdrawn port 0 reads zeroed and disconnected
Covers scePadReadState and scePadRead on port 0 while it is withdrawn, input
published during the withdrawal staying out of the reads, and the restored
state after reconnection.
2026-10-30 13:52:58 +00:00
slopgobblercobbler fe5d340cdf test(libScePad): cover vibration and light bar setters on controller handles 2026-10-30 01:13:25 +01:00
Dean 66248d1d5d Merge pull request #11349 from Wadefil/test/pad-special-handle-setters
test(libScePad): cover special handle state setters in GuestPad
2026-10-29 12:03:04 +13:00
MarcZX10 02c1c763cb test(libScePad): open special pads from eight threads at once
Each of 200 rounds releases eight threads together; they have to receive eight
distinct handles, which are then closed.
2026-10-28 22:29:41 +00:00
Dean b172776486 Merge pull request #12230 from milescoviello/test/pad-trigger-effect
test(libScePad): cover the trigger commands scePadSetTriggerEffect stores
2026-10-29 07:26:15 +13:00
Dean 651e248bef Merge pull request #11845 from Ralizaki/feat/libScePad-controller-settings
feat(libScePad): implement vibration and light bar brightness controls
2026-10-29 05:05:32 +13:00
milescovielloandClaude Opus 5.5 77600dcb87 test(libScePad): cover the trigger commands scePadSetTriggerEffect stores
Seven of the titles here import scePadSetTriggerEffect and no test reaches
it. Pin the requests it leaves in the port's output state: a weapon and a
feedback command as their DualSense effect bytes and fallback strengths,
the trigger mask leaving the other trigger as it was, an off command, and
a special handle leaving the output alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 04:28:40 +00:00
Daniel Castrillon 0701378a56 feat(pad): inject touch coordinates through command files 2026-10-27 12:53:57 +01:00
Adrià d410ce253f Merge pull request #11207 from EagleBearerYS/feat/imedialog-pad-keyboard
feat(libSceImeDialog): type with the controller on an on-screen keyboard
2026-10-27 12:00:58 +01:00
AnyPS5 Contributor 7fd424e51b feat(libScePad): implement vibration and light bar brightness controls 2026-10-27 11:04:10 +01:00
Dean 79c6c4222d Merge pull request #10880 from EagleBearerYS/feat/scepad-light-bar-and-handle-calls
feat(libScePad): implement scePadIsValidHandle, the light-bar resets and scePadSetVibrationForce
2026-10-27 21:14:55 +13:00
Adrià 1b2af92baf Merge pull request #11187 from p3n1cillin/claude/pad-ext-info-not-permitted
fix(libScePad): refuse scePadGetExtControllerInformation on a standard pad as the console does
2026-10-27 09:03:28 +01:00
Yunus Shaikh 30d2ca3492 fix(libScePad): keep presses from before a capture out of the intercepted reads
A press published before the keyboard captured the pad stayed in the
read latch and in the sample queue. The first ReadState after the
handoff returned it beside the Intercepted bit, and Read drained the
queued samples from before the capture unmasked. Clear both when a
sample starts the capture, so every read while it lasts holds only the
Intercepted bit.

Found by MarcZX10's review.
2026-10-27 05:20:10 +01:00
Yunus Shaikh a5128c9be7 fix(libScePad): follow the module's light bar resets, handle checks and forced vibration
BunnyFl ran firmware 13.42's libScePad natively over a slot table he
wrote, and oneandonlydean asked for the four calls to follow it.

scePadIsValidHandle matches the handle's open port type against the
argument, and answers false before scePadInit.
scePadResetLightBarAllByPortType returns INVALID_ARG for any type but 0,
1 and 2 before the initialisation check, and otherwise resets each open
handle of that type as scePadResetLightBar resets it;
scePadResetLightBarAll is type 0. So a standard port with no open handle
keeps its light bar, and types 3, 4 and 16 no longer throw.

scePadSetVibrationForce returns NOT_INITIALIZED before scePadInit, then
INVALID_ARG for a null parameter, without looking the handle up. There
is no pad driver here: a special handle returns PAD_OK and a standard
handle sets its port's motors, open or not. A handle with no pad port
throws, as the driver's answer for it is not measured.

The tests drop the closed and unknown handle checks that no longer hold
and check the measured answers; the debt entries cite the run and say
which parts are this model's.
2026-10-26 05:46:40 -07:00
Wadefil d3c0ed743e test(libScePad): cover special handle state setters in GuestPad 2026-10-26 13:24:10 +01:00
Adrià a4f0c002da Merge pull request #9919 from zaidhawk/fix/pad-latch-read-interval
fix(pad): keep a latched press for one and a half read intervals
2026-10-26 12:48:09 +01:00
Yunus Shaikh 87d01722ce test(libScePad): stop requiring the unmodelled port types to throw
Port types 3, 4 and 16 are valid ones the console answers.
scePadResetLightBarAllByPortType still refuses them, but a test that
requires the refusal would fail once they are supported. The positive
and invalid-argument checks stay.

Asked for in oneandonlydean's review.
2026-10-25 23:17:56 -07:00
p3nicillinandClaude Opus 5.5 3436e8fe7e fix(libScePad): refuse scePadGetExtControllerInformation on a standard pad
On a standard-port handle the console answers NOT_PERMITTED (0x80920101):
Halo CE Universal's pad probe measured it on firmware 13.59 for two
connected DualSenses in three runs. The function returned 0 with
invented controller information instead. The special port keeps its
zeroed answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 21:04:17 +00:00
Dean 85a4d7f8c8 Merge pull request #10754 from slugzero/fix/pad-get-controller-type
fix(libScePad): accept special handles in scePadGetControllerType
2026-10-26 02:32:31 +13:00
Yunus Shaikh 63ef18b435 feat(libScePad): implement scePadSetVibrationForce as scePadSetVibration
scePadSetVibrationForce takes the same handle and vibration parameter as
scePadSetVibration and returns its result. No system vibration-off state
exists here for it to override: scePadSetVibrationMode only stores its
mode.
2026-10-25 02:53:52 +00:00
Yunus Shaikh 3921b0bd5f feat(libScePad): reset every light bar in scePadResetLightBarAll
scePadResetLightBarAll returns each standard port's light bar to its
default, as scePadResetLightBar does for one handle.
scePadResetLightBarAllByPortType does the same for the standard port
type and nothing for the special one. It throws for types 3, 4 and 16,
and rejects other types with INVALID_ARG, as scePadOpen does.
2026-10-25 02:53:18 +00:00
Yunus Shaikh 2e4ce13282 feat(libScePad): implement scePadIsValidHandle
A handle is valid for its own port type while the handle table that
scePadGetHandle reads holds it open: a standard port that is open, a
special slot that is in use, or the open remote port. Any other port
type answers false.
2026-10-25 02:52:39 +00:00
Dean c15c361163 Merge pull request #10361 from orezraey/fix/libscepad-open-checks-measured-ps5
fix(libScePad): answer scePadOpen's user, index and port checks as measured on a PS5
2026-10-25 12:44:15 +13:00
SlugZero bee2bee10b fix(libScePad): accept special handles in scePadGetControllerType
Accept valid special handles in scePadGetControllerType by using KnownHandle, reporting PAD_CONTROLLER_TYPE_UNKNOWN (0) for special handles with no physical controller behind them.
2026-10-24 23:53:12 +02:00
zaidhawk 98e1c37658 fix(pad): keep a latched press for one and a half read intervals
A press latched between two scePadReadState calls was dropped after a
fixed 100 ms. A title that reads less often than that loses most quick
taps: Persona 3 Reload reads the pad only through scePadReadState and,
in its menus, about every 170 ms.

The latch now lasts one and a half times the interval between the
title's two previous reads, kept between 100 ms and 500 ms. The
interval from before a pause in reading still applies after it, so a
press older than that is not reported as a fresh one.
2026-10-24 17:28:02 -04:00
boykopovar 35cf8d56cd refactor(sdk): add canonical headers for core libraries 2026-10-24 23:17:37 +03:00
orezraeyandClaude Opus 5.5 199fd82e3d Merge main into fix/libscepad-open-checks-measured-ps5
Main limits the standard port to logged-in users, so scePadOpen now checks the port type alone first, then the user and index, and leaves the standard port's user lookup to PortForUser.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 15:30:45 -03:00
SlugZero 05c177d2d4 test(pad): exercise PadInput slot lifecycle and pin single connected pad count 2026-10-24 19:21:15 +02:00
SlugZero 6b7d6796ff fix(pad): preserve connected port state across initialization 2026-10-24 19:21:15 +02:00
SlugZero 58a1bcc5a3 feat(pad): support up to 4 controllers with dynamic user discovery
- Track up to 4 pad slots in libScePad with per-slot inputs, outputs, sensor fusion, and deadbands
- Support dynamic user login/logout events and multi-user registration in libSceUserService
- Map SDL controllers 0-3 to Players 1-4 in libSceVideoOut while preserving Player 1 keyboard and mouse composition
- Add test coverage for multi-controller pads and multi-user services
2026-10-24 19:21:15 +02:00