Commit Graph
207 Commits
Author SHA1 Message Date
MarcZX10 3a03e58b31 Merge remote-tracking branch 'upstream/main' into fix/pad-port0-connected-state
# Conflicts:
#	core/libs/prx/libScePad/src/PadState.cpp
2026-10-31 06:53:37 +00:00
Adrià 50a261e7e4 Merge pull request #13478 from JJenkx/fix/pad-injected-capture-hold
fix(pad): hold injected buttons that answered a dialog until released
2026-10-31 04:09:53 +01:00
JJenkxandClaude Opus 5.5 2e2f6b5eef fix(pad): expire a held injected button when its scripted press ends
A scripted button that answered a dialog stayed masked from the title
until a title read sampled it released. When the title did not read
during the release, a later scripted press of the same button was
masked as well. The mask now keeps only the buttons the command
timeline held without a break since the last read, so a press that
ends, or a new command, clears it whether or not it was sampled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 20:57:09 -04:00
MarcZX10 68a4689e62 Merge remote-tracking branch 'upstream/main' into fix/pad-port0-connected-state 2026-10-30 23:46:32 +00:00
Adrià 7ce71a9bb7 Merge pull request #13227 from kyon-eth/feat/pad-320-exports
feat(libScePad): declare 13 callable exports
2026-10-30 23:57:55 +01:00
Adrià 93f5331fd7 Merge pull request #13463 from notHaze/feat/configurable-mouse-stick
feat(input): add configurable mouse stick target
2026-10-30 22:50:29 +01: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
MarcZX10 bc37a818a0 Merge remote-tracking branch 'upstream/main' into fix/pad-port0-connected-state
# Conflicts:
#	core/libs/prx/libSceVideoOut/include/PadInput.hpp
2026-10-30 18:52:51 +00:00
JJenkxandClaude Opus 5.5 c2a766ec22 fix(pad): hold injected buttons that answered a dialog until released
A scripted press that answers a modal dialog or the IME was merged into
the host state for the capture, but video out's heldThroughCapture only
sees host buttons, so once the capture ended Pad::ReadState OR-ed the
still-active injected press into the title's read. A 400 ms Cross that
answered the dialog then also reached the title for the rest of the
press.

Record port 0's injected buttons while the pad is captured and mask them
from the title until they are released, as host buttons already are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 12:11:50 -04: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 737bcb8f69 refactor(libScePad): own the shared host volume state
The volume, mute and focus state that libSceAudioOut applies and libSceVideoOut changes now lives in libScePad, which both libraries already link, instead of in libSceAudioOut. The tests that compile the state directly and the environment reference follow the file.
2026-10-30 16:29:55 +01:00
MarcZX10 14b0b4b5f2 refactor(libScePad): move the host volume headers from libSceAudioOut
libSceVideoOut reads and changes the shared host volume state, and linking libSceAudioOut for it puts a second shared library with its own static SDL2 into libSceVideoOut. Both libraries already link libScePad, so the headers that describe that state move there first; the include paths and guards follow.
2026-10-30 16:29:55 +01:00
MarcZX10 7defe5daa2 feat(libScePad): bind ToggleMute to F8 by default
F8 was free: no default pad binding and none of F7, F10, F11 and F12 use it. The input mapper's defaults follow the native table.
2026-10-30 16:29:55 +01:00
MarcZX10 b4e0bfb5b5 feat(libScePad): bind VolumeUp to F6 by default
F6 was free: no default pad binding and none of F7, F10, F11 and F12 use it. The input mapper's defaults follow the native table.
2026-10-30 16:29:55 +01:00
MarcZX10 7baaa45354 feat(libScePad): bind VolumeDown to F5 by default
F5 was free: no default pad binding and none of F7, F10, F11 and F12 use it. The input mapper's defaults follow the native table.
2026-10-30 16:29:55 +01:00
MarcZX10 94a0c30497 feat(libScePad): carry volume and mute requests out of the keyboard handler
InputRequests gains volumeUp, volumeDown and toggleMute next to the other host requests, all false by default.
2026-10-30 16:29:55 +01:00
MarcZX10 7f7eaa7d18 feat(libScePad): add the volume and mute input controls
VolumeUp, VolumeDown and ToggleMute join the controls that never reach the title's pad state: Compose ignores them like the fullscreen, overlay and screenshot controls.
2026-10-30 16:29:55 +01:00
Florent Combet 26d36e9645 feat(input): add configurable mouse stick target 2026-10-30 15:41:51 +01:00
MarcZX10 10194ae5d5 fix(libScePad): report a withdrawn port 0 as disconnected in pad queries
scePadGetControllerInformation always answered connected = true with one
connected controller. For a handle on port 0 it now answers the port's
connection state, so a withdrawn port 0 reports connected false and
connectedCount 0; other ports keep the answer they gave before.

scePadGetInfo filled one connected entry on port 0 when no port was
connected. Port 0 is now the only port that can be withdrawn, so that
fallback would report a pad that is not there; with no connected port it
now reports connectedCount 0 and no entry.
2026-10-30 13:53:54 +00:00
MarcZX10 e990e8490d fix(libScePad): report port 0 as withdrawn with zeroed data
A disconnected port 0 used to return the neutral input of the last publish
with connected set to false. Titles that pause on connected = false get a
pad that still has its last buttons, so a withdrawn port 0 now reads as
zeroed data (orientation identity, connected false, connected_count of the
ports still connected), and a read on it clears the queued input.

Other ports and the default port 0 path are unchanged: port 0 is only
withdrawn when Pad::SetConnected(0, false) is called, which the default
configuration never does.
2026-10-30 13:52:57 +00:00
JJenkxandClaude Opus 5.5 728d7aa34c fix(pad): let harness input answer system dialogs
APS5_PAD_INPUT_FILE input was merged only into guest pad reads. While a
modal dialog or the IME held the pad, the title saw the intercepted
state and the dialog saw only host SDL input, and without a controller
video out did not publish slot 0 at all. A message dialog opened by the
title (Void Terrarium++ "System data not found" on a fresh profile)
could then never be answered in a scripted run.

Merge the injected input into the host state handed to the capturing
dialog, publish slot 0 every frame while the pad is captured, and once
more when the capture ends so the title stops reading the intercepted
state.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 08:14:30 -04:00
Kyon ec897f7ff4 feat(libScePad): declare 13 callable exports 2026-10-30 07:10:16 +00:00
MarcZX10 9d2beb0084 feat(input): add the ShowPadStatus keyboard action
A rebindable keyboard action, F9 by default, that asks for the
controller status panel. F9 is the first free function key: F7, F10,
F11 and F12 are bound by default and no default keyboard-to-pad binding
uses it. Like ToggleFullscreen, TogglePerformanceOverlay and Screenshot
it accepts only keyboard keys, fires once per press (not on key repeat)
and does not press any pad button.

The input mapper's catalogue gets the action, its F9 default and its
keyboard-only restriction, and its existing source-contract tests list
it, since they compare the actions, restrictions and built-in bindings
with the native files.
2026-10-30 05:54:47 +01:00
AdriàandClaude Sonnet 5.5 ea19d94fea fix(libScePad): link the rumble intensity test statically on MinGW
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-29 04:01:50 +01:00
MarcZX10 2260d1489b test(libScePad): cover the rumble intensity scale, bypass, off and parser
Check the scale against an independent exact reference for every amplitude and percentage, the 100 percent command byte for byte against the unscaled formula for every motor pair, that 0 percent only ever hands a recording sink a stop, the stop after a running full-strength rumble, intermediate percentages, and that the parser accepts 0 to 100 and refuses everything else naming ANYPS5_RUMBLE and the value.
2026-10-29 02:06:36 +00:00
MarcZX10 660dff1bd1 feat(libScePad): add the host rumble intensity scale and ANYPS5_RUMBLE parser
Add a header-only helper that scales the 16-bit motor amplitudes of a rumble command by a whole-number percentage with exact integer arithmetic (round half up, never amplifying), builds the command the host controller receives (a stop when nothing is left to play), and parses ANYPS5_RUMBLE as a whole number from 0 to 100, refusing anything else with an error that names the variable. 100 is a bypass that returns the unscaled command, so an unset variable keeps today's behaviour. Nothing uses it yet.
2026-10-29 02:06:36 +00: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
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 2a3cd39882 feat(libSceVideoOut): hand the pad to an open keyboard and hold back the game's reads 2026-10-27 05:19:49 +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
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
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 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
orezraeyandClaude Opus 5.5 7844bbb5e1 Merge main into fix/libscepad-open-checks-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 12:58:01 -03:00
Adrià 3fcb5e4d76 Merge pull request #9178 from norton62/fix/pad-remote-control-port
fix(libScePad): open the system remote control port as a disconnected device
2026-10-24 17:40:15 +02:00