feat(pad): assign controllers to stable player slots #18783

Merged
MarcZX10 merged 12 commits from upstream-pr/18783 into main 2026-11-21 16:47:04 +00:00
MarcZX10 commented 2026-11-12 08:41:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T08:41:29Z.


What

Assign SDL controllers to stable guest player slots using optional exact per-player SDL serial settings (ANYPS5_PAD_PLAYER_1_SERIAL through _4_SERIAL). Configured slots stay reserved while their controller is disconnected; other controllers use the first unreserved slot. Duplicate configured serials fail during pad input initialization. Controller serial logging is opt-in with ANYPS5_PAD_LOG_CONTROLLER_SERIAL=1.

Tested

Linux, Debian 12 x86_64. Built pad_sdl_tests on main at e911e78a7d365101942023a51c675a2433b2164f and candidate head aea6b3cc76c11e647036a20dff220b24ef5507d0, then ran the focused pad_sdl CTest on both with QEMU's Haswell CPU profile, Xvfb, Mesa lavapipe and VK_LAYER_KHRONOS_validation 1.4.335. Both runs passed; neither log reported a missing validation layer or a Vulkan VUID. SDL virtual controllers without serials verified that a reserved player slot remains available.

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: llvmpipe (LLVM 15.0.6, 256 bits), Mesa 22.3.6-1+deb12u2 (lavapipe, software Vulkan), Vulkan 1.3.230, Debian 12 x86_64
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5274278083 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18783). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-12T08:41:29Z. --- ### What Assign SDL controllers to stable guest player slots using optional exact per-player SDL serial settings (`ANYPS5_PAD_PLAYER_1_SERIAL` through `_4_SERIAL`). Configured slots stay reserved while their controller is disconnected; other controllers use the first unreserved slot. Duplicate configured serials fail during pad input initialization. Controller serial logging is opt-in with `ANYPS5_PAD_LOG_CONTROLLER_SERIAL=1`. ### Tested Linux, Debian 12 x86_64. Built `pad_sdl_tests` on main at `e911e78a7d365101942023a51c675a2433b2164f` and candidate head `aea6b3cc76c11e647036a20dff220b24ef5507d0`, then ran the focused `pad_sdl` CTest on both with QEMU's Haswell CPU profile, Xvfb, Mesa lavapipe and `VK_LAYER_KHRONOS_validation` 1.4.335. Both runs passed; neither log reported a missing validation layer or a Vulkan VUID. SDL virtual controllers without serials verified that a reserved player slot remains available. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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: llvmpipe (LLVM 15.0.6, 256 bits), Mesa 22.3.6-1+deb12u2 (lavapipe, software Vulkan), Vulkan 1.3.230, Debian 12 x86_64 - [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!18783
No description provided.