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]>
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]>
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]>
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.
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.
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.
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.
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.
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]>
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.
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.
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.
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.
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.
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]>
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.
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.
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.
Accept valid special handles in scePadGetControllerType by using KnownHandle, reporting PAD_CONTROLLER_TYPE_UNKNOWN (0) for special handles with no physical controller behind them.
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.
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]>
- 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