Input: add Windows DualSense / DualSense Edge support #2335
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2337"
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 Marvisak/VIctory. Originally posted by Asem912 on 2026-11-25T11:00:51Z.
Summary
Adds native Windows HLE support for PlayStation 5 DualSense (
0x0CE6) and DualSense Edge (0x0DF2) controllers ingameinput.dll, supporting wired USB, Raspberry Pi Pico 2 WDS5Donglewireless bridges, and native Bluetooth (0x31enhanced reports) using existing workspace dependencies.Highlights
victory-hle::modules::gameinput::dualsense):UsagePage 0x01 / Usage 0x05withFILE_SHARE_READ | FILE_SHARE_WRITEso companion tools andDS5DongleWebHID configurators are never locked out.0x01/0x02and Bluetooth0x31(auto-reads Feature0x05to enter enhanced mode, validates0xA1/0xA2/0xA3seeded CRC-32).sensor_timestampliveness (1.5 s freeze timeout) so an idle/powered-off wireless pad behind a plugged-inDS5Donglecleanly falls back to keyboardWASDwithout stuck buttons, and re-fetches0x05/0x20on reconnect.0xF) and translates Xbox trigger rumble scalars into DualSense adaptive triggerVibration/Hybrid/Offmodes with ~100 Hz output rate limiting and immediate zero-stop flushes.0x20firmware version and setsCOMPATIBLE_VIBRATION2(valid_flag2bit 2) for firmware>= 0x0224, leaving audio volume bytes untouched forDS5Donglev0.8+ volume lock compatibility.audio_4ch/hybrid) blending rumble carriers with title-scopedVIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACKlow-pass audio while keeping Ch1/2 silent by default.IGameInputDevice::GetBatteryState(0x28) andIGameInput::RegisterSystemButtonCallback(0x50, short-press PS Guide,PS + Touchpadgyro recenter, ignoring>= 600 msholds for power-off / multi-device slot switching).PlayerSpaceYaw+Roll,AdsOrTouchdefault, anti-deadzone floor) onto right stick.HISTORYto512with analog sub-LSB jitter coalescing to preventREFERENCE_TOO_OLDon slow frames, while preserving cross-device time-orderednext_reading/previous_reading(#361) andVICTORY_KEYSpad merging (#197).VID_28DE/ ViGEm) while preserving mixed genuine Xbox + PS5 pads.lifecycle::end_title,Ctrl+C, panic, andvictory-loaderunhandled exceptions.victory-core,victory.example.toml,apps/victory):[input]and[input.dualsense]TOML sections andVICTORY_*env overrides.Verification
cargo clippy --workspace --all-targets --locked -- -D warnings(pass)cargo clippy --workspace --all-targets --all-features --locked -- -D warnings(pass)cargo test -p victory-hle --features diagnostics --locked -- modules::gameinput modules::lifecycle(32 passed; synthetic HID report fixtures +VICTORY_KEYS/ cross-device walk tests)cargo test -p victory-core -p victory -p victory-loader -p victory-pe -p victory-pipeline -p xtask --locked(all passed, includingconfig,crash, andxtaskasset-policy checks)DS5Donglehardware E2E on device (and fullcargo test --workspace --lockedoutside sandbox; in the sandboxed run, unrelatedvictory-gpudescriptor/memory tests failed).Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T11:03:10Z.
Review: COMMENTED
Static review only: apps/victory input paths are Windows-only here; not tested on macOS. Big feature (+4157): DualSense/DualSense Edge over wired USB, Pico 2 W DS5Dongle bridge and Bluetooth, with haptics/adaptive triggers/gyro/touchpad/battery, config under [input.dualsense]. Suggest splitting the victory-core parts from the input driver for reviewability; needs Windows hardware validation with an actual DS5.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T15:23:56Z.
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main(conflicts inapps/victory/src/main.rsandcrates/victory-hle/src/modules/gameinput/mod.rs). It will be reviewed again once it is rebased.From the earlier needs-work note, still open: dependency changes need the maintainer's decision, evidence for the GameInput behaviour changes, no hardware testing yet, and the PR should be split into smaller changes with shorter docs.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by nullexxx on 2026-11-27T15:44:49Z.
Hardware results for this protocol, from a port into TaynanGT/Vice-Tay (Proton on CachyOS, DualSense over USB, firmware 0x0630):
WriteFilecompletes with 47 bytes written for the 48-byte report, since the report ID byte isn't counted. A check that the byte count equals the report length treats every write as failed.Thanks @Asem912 for the protocol work, and aleksesipenko for VIctory-RTX.
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.