scePadSetVibrationMode rejected mode 2 (compatible, per SharpProspero's
ScePadVibrationMode). The PS5 SDL joystick driver requests it on every
open and closes the pad when it fails, so SDL titles lost their controller.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add scePadOpenExt for special ports, which return DEVICE_NOT_CONNECTED because the host has no special controller, and the extended read and report exports, which throw.
NID fCWdlnmB1Ks was exported as an unknown function that threw. The
name scePadIsRemoteController hashes to it. PPSA16064 (Minecraft
Dungeons II) calls it once per controller after
scePadGetControllerInformation, with the pad handle and the address of a
byte it has just zeroed, and ignores the result.
It reports whether the controller is connected through Remote Play.
Controllers here are local devices, so the answer is always false. An
invalid handle returns INVALID_HANDLE and a null output INVALID_ARG, as
the other pad calls do. Without it the title aborted at the main menu.
scePadSetAngularVelocityBiasCorrectionState, which the title imports but
does not call during start-up, is added as an unimplemented export.
guest_pad checks the handle and null-output errors and the result.
scePadRead reported only the current state, so input that changed and
changed back between two reads was lost. Published states are now kept in
a queue of up to 64 and drained oldest first; with none queued the current
state is returned as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PPSA14632 calls scePadReadState (eboot 0x4593a8) for the open pad and
then for a second pad slot it never opened, whose handle is 0. The
title skips only negative handles and ignores the result, but
scePadReadState threw for any handle other than the open one. It now
returns PAD_ERROR_INVALID_HANDLE (0x80920003), as the other pad
functions do and as shadPS4's scePadRead does for an unknown handle;
scePadRead passes it on.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Per review: scePadSetAngularVelocityDeadbandState now returns PAD_ERROR_INVALID_HANDLE for a
handle other than PAD_HANDLE, like the neighbouring setters. Enabling the dead band still throws,
because the angular-velocity reading path does not apply the filter (that would change input, not
UI, so it is not a silent stub); disabling it succeeds, which matches the unfiltered readings.
The test checks the disabled call, the bad handle, and no longer asserts the enabled path.
scePadSetAngularVelocityDeadbandState was the last throwing stub in libScePad. It toggles a
dead-band filter on the controller's angular-velocity (gyro) readings; the reading path does
not apply that optional filter, so the call succeeds and does nothing, as it does in shadPS4.
Extends the existing guest_pad test with the two enable/disable calls. It fails on main (the
stub throws) and passes with the change.
scePadOpen now records that the pad is open and scePadClose clears it;
scePadGetHandle returns the handle for a port scePadOpen accepts while
the pad is open, and DEVICE_NO_HANDLE otherwise. No embedded microphone
is emulated, so the option that weakens trigger vibration while it is
in use is accepted with no effect.
Co-Authored-By: Claude <noreply@anthropic.com>