feat(pad): reload the input mapping at runtime with F1 #17595

Merged
MarcZX10 merged 18 commits from upstream-pr/17595 into main 2026-11-12 04:08:10 +00:00
MarcZX10 commented 2026-11-09 00:22:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-09T00:22:33Z.


What

Pad input mapping can be reloaded while the title runs. F1 is the default ReloadInputMapping key. The new file is read completely before anything changes; if it has an error, the current mapping stays and the error names the file and the line. The mapping is kept in a snapshot that the input thread swaps in.

The last test commit compares the whole configuration after a failed reload, field by field. Its earlier version assumed a single Cross binding, which the default table never has; the comparison here covers only the binding fields that exist in this branch.

Tested

Linux, Debian kernel 6.1.0-54-amd64, Intel Xeon E5-1620 v2. Pad tests do not need a display. Head e85cbbfc78:

flock <build lock> env VERIFY_DIR=<worktree> VERIFY_TAG=split2 ANYPS5_REQUIRE_DISPLAY=1 bash <main checkout>/.git/info/tools/run_tests.sh '^(pad_input_mapping|pad_keyboard_mouse)$' pad_input_mapping_tests pad_keyboard_mouse_tests

Output:

BUILD-EXIT 0
1/2 Test #3872: pad_input_mapping ................   Passed    0.02 sec
2/2 Test #3878: pad_keyboard_mouse ...............   Passed    0.02 sec
100% tests passed, 0 tests failed out of 2

Overlap: pr_overlap found no flagged PR. #17149 (WHEEL:Left and WHEEL:Right) adds wheelTilt to InputBinding and changes the wheel parser in the same files; the two will conflict, and the one merged second must compare wheelTilt too.

Not verified:

  • A real controller and real window focus. The unit tests use the test drivers.
  • Other operating systems: nothing was run on Windows or macOS.
  • Titles: no title was run with these changes.

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 under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5216722761 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17595). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-09T00:22:33Z. --- ### What Pad input mapping can be reloaded while the title runs. F1 is the default `ReloadInputMapping` key. The new file is read completely before anything changes; if it has an error, the current mapping stays and the error names the file and the line. The mapping is kept in a snapshot that the input thread swaps in. The last test commit compares the whole configuration after a failed reload, field by field. Its earlier version assumed a single Cross binding, which the default table never has; the comparison here covers only the binding fields that exist in this branch. ### Tested Linux, Debian kernel 6.1.0-54-amd64, Intel Xeon E5-1620 v2. Pad tests do not need a display. Head `e85cbbfc78`: ``` flock <build lock> env VERIFY_DIR=<worktree> VERIFY_TAG=split2 ANYPS5_REQUIRE_DISPLAY=1 bash <main checkout>/.git/info/tools/run_tests.sh '^(pad_input_mapping|pad_keyboard_mouse)$' pad_input_mapping_tests pad_keyboard_mouse_tests ``` Output: ``` BUILD-EXIT 0 1/2 Test #3872: pad_input_mapping ................ Passed 0.02 sec 2/2 Test #3878: pad_keyboard_mouse ............... Passed 0.02 sec 100% tests passed, 0 tests failed out of 2 ``` Overlap: pr_overlap found no flagged PR. #17149 (WHEEL:Left and WHEEL:Right) adds `wheelTilt` to `InputBinding` and changes the wheel parser in the same files; the two will conflict, and the one merged second must compare `wheelTilt` too. Not verified: - A real controller and real window focus. The unit tests use the test drivers. - Other operating systems: nothing was run on Windows or macOS. - Titles: no title was run with these changes. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!17595
No description provided.