gameinput: support PS5 controllers (DualSense, DualSense Edge) without a remapper #42
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/42"
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?
Imported from TaynanGT/Vice-Tay-v2. Originally posted by pawcijo on 2026-11-26T18:03:12Z.
@pawcijo on GitHub · 2026-11-26 17:58 UTC · original
pawcijo:feat/dualsense-input→main· +443 −22 · 4 files · 1 commits · openSummary
PS5 controllers are not XInput devices, so unless Steam Input or DS4Windows remaps them, the title never sees them. This PR reads them directly over HID, on both USB and Bluetooth.
crates/victory-hle/src/modules/gameinput/dualsense.rs:054C:0CE6) and DualSense Edge (054C:0DF2) every 2 s.0x05to switch the controller to full0x31reports, as Linuxhid-playstationdoes. The short0x01Bluetooth report is parsed too.gameinput.rs, PS5 controllers fill the host slots XInput leaves empty, so the one-pad merge, connect/disconnect callbacks and the scripted keys work as before.VICTORY_DUALSENSE=0to turn this off when a remapper already presents the controller as an Xbox pad. Otherwise, withVICTORY_ONE_PAD=0, it would appear twice. With the default single merged pad, the duplicate does no harm.Win32_Devices_DeviceAndDriverInstallationandWin32_Devices_HumanInterfaceDevicefeatures towindows-sys.Button mapping
The PS button and the mute button are not mapped.
Not included
Testing
cargo test -p victory-hle --lib gameinput: 13 tests pass, including 3 new ones that parse USB, full Bluetooth and short Bluetooth reports.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.