Keep Sony pads reachable alongside XInput controllers #420
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/readmet3xt-lab--foxhound!420
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-420"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Yoshi-233 on GitHub · 2026-12-02 05:58 UTC · original
Yoshi-233:fix/mixed-xinput-hid-slots→main· +60 −11 · 2 files · 72 commits · closed without mergingWith an Xbox controller in XInput slot 0 and a single Sony controller on raw HID, Foxhound reads the Xbox pad, then looks up HID device index 1 for host slot 1. The Sony controller is at HID index 0, so its buttons never reach the game. With two Sony pads, the second one can appear while the first is missing.
This change records the host slot on the HID device. A surviving reader keeps its assignment when another device is unplugged. If XInput takes over its slot, the displaced HID pad can claim a free slot on a subsequent poll. Rumble uses the same assignment as input, including when the game exposes the controllers as one pad.
Validation
94c3c5f), 41/80 combinations had the expected devices and rumble destinations. With this change, 80/80 matched in both individual and merged-pad modes.VICTORY_HID_PADS=0.cargo check --locked -p victory-hle --tests --target x86_64-pc-windows-gnupassed with default features and with--all-features.Physical Windows controller testing is still pending. A short hardware check is to connect an Xbox pad first and a DualSense or DualShock 4 second, check a button from each, then unplug the Xbox pad and check the Sony pad again.
Pull request closed