Input: read PlayStation and generic HID pads XInput does not list #5
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/Skrills68--Valhalla-xmem!5
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-5"
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?
@delacor on GitHub · 2026-11-30 21:40 UTC · original
delacor:hid-gamepad-pads→main· +1044 −4 · 3 files · 2 commits · openOnly XInput pads reached the title: a DualSense, a DualShock 4 or any other
pad without an XInput driver did nothing unless something like Steam Input
turned it into an XInput pad. Pads XInput does not list are now read over the
HID API and fill the XInput slots it leaves empty:
report layouts, with rumble through their output reports;
Rx/Ry right stick, the hat as the D-pad, buttons in the usual DirectInput
order,
VICTORY_PAD_BUTTONSfor other orders,VICTORY_PAD_SECONDSforthe rescan period.
XInput's own HID devices are skipped. An XInput pad keeps its slot; a HID pad
in a slot XInput takes moves to a free one.
Host::pad()reads XInput firstand falls back to a HID pad in the same slot;
Host::rumble()reaches the HIDpad's output reports. The existing focus gating (
VICTORY_PAD_FOCUS) and thescripted key overlay now cover HID pads too.
victory-hlegains theWin32_Devices_DeviceAndDriverInstallationandWin32_Devices_HumanInterfaceDevicewindows-sys features for the enumeration.
Where it comes from
Ported from the delacor/VIctory fork, commit
a9553ae72("Input: read PlayStation and generic HID pads that XInput does not list", by
marquezini) and the
hidmodule that grew out of it. The source fork checkedit with a DualSense on USB: every button, the triggers and both sticks over
their whole range, and the rumble.
The two trees'
gameinput.rsdiffer around the host pad path (mouse look,scripted input, focus gating), so only the integration is adapted;
gameinput/hid.rsitself is carried over unchanged.Verified on this branch
cargo check --target x86_64-pc-windows-msvc -p victory-hle --testsclean(clang-cl + lld-link + the xwin-splatted SDK, as
build.shsets up).cargo test -p victory-hle --lib hid::):10 passed, 0 failed, 1 ignored (the one needs a real pad).
The report layouts, the button map, trigger axes, normalisation, the
rumble output report and the IEEE CRC are exercised.
cargo test -p xtask(asset policy + switch documentation): 9/9 pass.Not yet run: a live pad check on this tree's full application build. On the
source fork the same module was exercised with a physical DualSense.
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.