Restore native PS5 DualSense HID fallback in victory-hle #367
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/Belobug--VIctory-Belobug-AMD!367
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-367"
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?
@nouveeeeec on GitHub · 2026-11-26 22:35 UTC · original
nouveeeeec:feat/dualsense-hid→a-publier· +530 −10 · 4 files · 1 commits · closed without mergingWhat this does
Ports the native Windows HID reader for Sony DualSense (
0x054c:0x0ce6) and DualSense Edge (0x054c:0x0df2) from the previous branch into the new codebase so PlayStation controllers work out of the box without DS4Windows or Steam Input.Changes
crates/victory-hle/src/modules/dualsense.rsand registered it inmod.rs.Win32_Devices_DeviceAndDriverInstallationandWin32_Devices_HumanInterfaceDevicefeatures forwindows-sysincrates/victory-hle/Cargo.toml.Host::pad()incrates/victory-hle/src/modules/gameinput.rsto fall back todualsense::latest()when XInput slot 0 is empty (feeds cleanly intoVICTORY_ONE_PAD).Testing
cargo build --release -p victory.@upipibi on GitHub · 2026-11-27 02:19 UTC · original
A crash this brings back, found by reading the diff at
ed96378(not run):device_paths()copies each HID path without its terminating NUL (crates/victory-hle/src/modules/dualsense.rs:291,std::slice::from_raw_parts(path, len).to_vec()), andopen_pad()passespath.as_ptr()toCreateFileW(:160), which reads up to a NUL, past the end of the copy. #40 and #156 fix this same line in the earlier reader: with no DualSense connected the scan runs every 2 s, and once a copy ends at a heap page the run stops with an access violation (#156 has the stack). Their fix is to push the NUL onto the owned path. The same reader is open upstream as Marvisak/VIctory#150, where this was reported too.Overlap: #420 also adds a DualSense HID reader (several pads, Bluetooth, rumble,
VICTORY_DUALSENSE=0), and it does push the NUL (gameinput/dualsense.rs). The two conflict incrates/victory-hle/src/modules/gameinput.rs, so only one of them can go in as is.@nouveeeeec on GitHub · 2026-11-27 05:33 UTC · original
@nouveeeeec on GitHub · 2026-11-27 05:33 UTC · original
Thanks for catching the missing NUL terminator and pointing out #420! Since #420 is more complete (multi-pad, rumble,
VICTORY_DUALSENSE=0) and already handles the NUL termination properly, I'll close this PR in favor of #420.Pull request closed