gameinput: support PS5 controllers (DualSense, DualSense Edge) without a remapper #42
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
old-names
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!42
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@pawcijo on GitHub · 2026-11-26 17:58 UTC · original
pawcijo:feat/dualsense-input→main· +1793 −299 · 21 files · 3 commits · closed without mergingSummary
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
@TaynanGT on GitHub · 2026-11-26 19:18 UTC · original
The report parser has coverage for USB and Bluetooth. Before enabling this by default, could you check reconnecting over both transports and running alongside an XInput remapper? The same physical controller can be exposed through both paths, so please check whether it occupies two slots and document when to use
VICTORY_DUALSENSE=0.@TaynanGT on GitHub · 2026-11-26 20:01 UTC · original
I added XInput priority and stable HID slots in
27e97585. With the setting unset, a direct DualSense works when XInput is empty and a remapped pad is read through XInput once.VICTORY_DUALSENSE=1allows a separate Xbox pad and a direct DualSense to coexist. The synthetic tests cover source selection and a surviving pad retaining its slot. For the hardware test, please try USB and Bluetooth, reconnect one of two pads, and verify a remapped button fires a single action.@TaynanGT on GitHub · 2026-11-26 20:04 UTC · original
Thanks for putting together the direct HID support, @pawcijo. I ran
cargo test --locked -p victory-hle --lib gameinput -- --test-threads=1on Windows at27e97585. All 15 tests passed, including USB and both Bluetooth report types, XInput priority and the slot-retention test. Windows did not show a connected DualSense here, so USB/Bluetooth reconnect and remapper behavior still need a physical-pad check.@pawcijo on GitHub · 2026-11-26 20:21 UTC · original
Thanks for the review. I tested reconnects on both transports and with two pads, on real hardware: two DualSenses, Windows 11, no remapper. Everything ran on the branch head
ab9927e, which is built on your27e9758.Results:
What
ab9927eadds on top of your commit:slots().VICTORY_DUALSENSEvalue fits which setup.probe_host_pads, prints what each host slot holds while pads are plugged in and out:cargo test -p victory-hle --lib probe_host_pads -- --ignored --nocaptureNot tested: running alongside DS4Windows or DualSenseX, because this machine has no ViGEm or HidHide. With the default mode, any XInput pad switches input to XInput only, so a remapped pad shouldn't be read twice. That conclusion comes from the code, not a test.
@TaynanGT on GitHub · 2026-11-26 21:26 UTC · original
Thanks for testing both transports, two pads, and the USB takeover on real hardware. The prospective merge against current
mainalso changes DStorage, XAsync, and several other HLE modules. I’ll prepare an input-only integration on currentmainso the tested reconnect fixes can be reviewed and checked on that base.@TaynanGT on GitHub · 2026-11-26 21:29 UTC · original
The input-only integration is in #68, with your authorship preserved. It includes a small follow-up that sizes the calibration and pairing buffers from
HIDP_CAPS.FeatureReportByteLength. Windows CI is running there. Your hardware results atab9927eare linked in the new PR.@TaynanGT on GitHub · 2026-11-26 21:37 UTC · original
The input changes are now on main through #68, with your authorship preserved. Windows CI passed on the input-only integration. If you get a chance to retest the final report-buffer sizing on your pads, please share the results in #68.
Pull request closed