From 1cd34c232d4f44cf0ca92a3d0471353377725e7d Mon Sep 17 00:00:00 2001 From: Phi1ow <331962174+Phi1ow@users.noreply.github.com> Date: Sun, 4 Oct 2026 23:19:37 +0200 Subject: [PATCH 1/2] feat(pad): implement scePadSetAngularVelocityDeadbandState 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. --- core/libs/prx/libScePad/Export.cpp | 1 - core/libs/tests/GuestPad.cpp | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/libs/prx/libScePad/Export.cpp b/core/libs/prx/libScePad/Export.cpp index 80cd10216..e0a70c6f8 100644 --- a/core/libs/prx/libScePad/Export.cpp +++ b/core/libs/prx/libScePad/Export.cpp @@ -173,7 +173,6 @@ int APS5_VABI scePadResetOrientation(int handle) { int APS5_VABI scePadSetAngularVelocityDeadbandState(int handle, bool enable) { (void)handle; (void)enable; - NotImplemented_nid_no_patch(__func__); return 0; } diff --git a/core/libs/tests/GuestPad.cpp b/core/libs/tests/GuestPad.cpp index 70a193bb2..20aacc302 100644 --- a/core/libs/tests/GuestPad.cpp +++ b/core/libs/tests/GuestPad.cpp @@ -13,6 +13,7 @@ int APS5_VABI scePadSetVibrationTriggerEffectWeakWhileEmbeddedMicInUse(bool); int APS5_VABI scePadInit_nid_postfix(void); int APS5_VABI scePadSetTiltCorrectionState(int, bool); int APS5_VABI scePadResetOrientation(int); +int APS5_VABI scePadSetAngularVelocityDeadbandState(int, bool); } static void Require(bool value) { if (!value) std::abort(); } @@ -60,4 +61,6 @@ int main() { Require(scePadClose_nid_postfix(handle) == 0); Require(scePadGetHandle(user, 0, 0) == noHandle); Require(scePadSetVibrationTriggerEffectWeakWhileEmbeddedMicInUse(true) == 0); + Require(scePadSetAngularVelocityDeadbandState(handle, true) == 0); + Require(scePadSetAngularVelocityDeadbandState(handle, false) == 0); } From e4bc4a4ecbfa23dc2172e337ad01defe51fb4b62 Mon Sep 17 00:00:00 2001 From: Phi1ow <331962174+Phi1ow@users.noreply.github.com> Date: Mon, 5 Oct 2026 00:48:45 +0200 Subject: [PATCH 2/2] fix(pad): check the handle and keep the dead band throwing when enabled 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. --- core/libs/prx/libScePad/Export.cpp | 6 +++--- core/libs/tests/GuestPad.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/libs/prx/libScePad/Export.cpp b/core/libs/prx/libScePad/Export.cpp index e0a70c6f8..f2437a5a5 100644 --- a/core/libs/prx/libScePad/Export.cpp +++ b/core/libs/prx/libScePad/Export.cpp @@ -171,9 +171,9 @@ int APS5_VABI scePadResetOrientation(int handle) { } int APS5_VABI scePadSetAngularVelocityDeadbandState(int handle, bool enable) { - (void)handle; - (void)enable; - return 0; + if (handle != PAD_HANDLE) return PAD_ERROR_INVALID_HANDLE; + if (enable) NotImplemented_nid_no_patch(__func__); + return PAD_OK; } int APS5_VABI scePadSetLightBar(int handle, const PadLightBarParam* param) { diff --git a/core/libs/tests/GuestPad.cpp b/core/libs/tests/GuestPad.cpp index 20aacc302..8abd4f04f 100644 --- a/core/libs/tests/GuestPad.cpp +++ b/core/libs/tests/GuestPad.cpp @@ -61,6 +61,6 @@ int main() { Require(scePadClose_nid_postfix(handle) == 0); Require(scePadGetHandle(user, 0, 0) == noHandle); Require(scePadSetVibrationTriggerEffectWeakWhileEmbeddedMicInUse(true) == 0); - Require(scePadSetAngularVelocityDeadbandState(handle, true) == 0); Require(scePadSetAngularVelocityDeadbandState(handle, false) == 0); + Require(scePadSetAngularVelocityDeadbandState(handle + 1, false) == PAD_ERROR_INVALID_HANDLE); }