Skip to content

fix(pad): accept vibration mode 3 - #3727

Merged
adriadam10 merged 2 commits into
boykopovar:mainfrom
mariusyo07:fix/pad-vibration-mode-3
Oct 11, 2026
Merged

adriadam10 merged 2 commits into
boykopovar:mainfrom
mariusyo07:fix/pad-vibration-mode-3

Conversation

@mariusyo07

Copy link
Copy Markdown
Contributor

What

Allows vibration mode 3 in scePadSetVibrationMode in libScePad.

Broken Sword - Shadow of the Templars: Reforged (PPSA21480, Windows) calls scePadSetVibrationMode(handle, 3) after scePadOpen and aborts on failure (#3704):

ps5_controls.cpp:19 "Sony call failed with code 80920001"

which is PAD_ERROR_INVALID_ARG. scePadSetVibrationMode previously accepted only modes 0 to 2.

Modes 0 to 3 are now accepted, while 4 and above (and negative values) remain invalid.

guest_pad is updated: asserts that mode 3 returns 0 and mode 4 returns PAD_ERROR_INVALID_ARG.

Tested

  • Linux (GCC 16.1.1): Export.cpp syntax check passes; GuestPad.cpp test asserts mode 3 is accepted (0) and mode 4 returns PAD_ERROR_INVALID_ARG (fails on main where mode 3 expects PAD_ERROR_INVALID_ARG).
  • python3 tools/check_conventions.py --base upstream/main: all checks passed.
  • git diff --check: passes with no whitespace or style warnings.
  • python3 tools/pr_overlap.py --branch fix/pad-vibration-mode-3: no overlap with open pull requests.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

mariusyo07 and others added 2 commits October 11, 2026 18:02
Broken Sword Reforged (PPSA21480) calls scePadSetVibrationMode(handle, 3) after
scePadOpen and treats a failure as fatal (ps5_controls.cpp:19 "Sony call failed
with code 80920001"). Modes up to 3 are accepted, 4 and above stay invalid.

Co-Authored-By: xXPBSXx <20614131+xXPBSXx@users.noreply.github.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the prx label Oct 11, 2026
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked on Linux: build and guest_pad pass, and the updated test fails without the change. The mode is only stored in PadState, so accepting 3 has no other effect.

Added one commit: a TechnicalDebt line ("Unknown function info") for the unverified meaning of mode 3, since the only evidence is that PPSA21480 calls it and aborts on failure.

Merging once CI is green.

@github-actions

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#3728 docs/dev/TechnicalDebt.md L93-94

@adriadam10
adriadam10 merged commit 43bc17f into boykopovar:main Oct 11, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants