Input: read PlayStation and generic HID pads XInput does not list #50

Manually merged
github merged 1 commit from github-bot/gh-50 into main 2026-12-01 20:58:48 +00:00 AGit
Owner

@⁠delacor on GitHub · 2026-11-30 23:10 UTC · original
delacor:hid-gamepad-pads → main · +1044 −4 · 3 files · 1 commits · merged 2026-12-01 20:55 UTC

Only 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:

  • DualShock 4 and DualSense (and Edge), USB and Bluetooth, by their own
    report layouts, with rumble through their output reports;
  • any other HID gamepad or joystick by its usages: X/Y left stick, Z/Rz or
    Rx/Ry right stick, the hat as the D-pad, buttons in the usual DirectInput
    order, VICTORY_PAD_BUTTONS for other orders.

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 first and
falls back to a HID pad in the same slot; Host::rumble reaches the HID pad's
output reports. The focus gating (VICTORY_PAD_FOCUS) and the scripted key
overlay now cover HID pads too. victory-hle gains the
Win32_Devices_DeviceAndDriverInstallation and
Win32_Devices_HumanInterfaceDevice windows-sys features.

Ported from delacor/VIctory commit a9553ae72 (author marquezini) and its hid
module, which is carried over unchanged; the gameinput.rs integration is
adapted to this tree's host pad path. The source fork checked it with a
DualSense on USB: every button, the triggers and both sticks over their whole
range, and the rumble.

Verified on this branch: cargo check --tests (msvc target) is clean; clippy
has no warnings in the touched files; the hid module's unit tests pass under
Wine (10 passed, 1 ignored - the one needs a real pad).

Note: the xtask policy test repository_passes_policy already fails on main
(crates/victory-shader/src/emit/lower.rs is 910329 bytes against the
655360-byte limit); this branch adds no new violation.

**@⁠delacor** on GitHub · 2026-11-30 23:10 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/50) `delacor:hid-gamepad-pads` → `main` · +1044 −4 · 3 files · 1 commits · merged 2026-12-01 20:55 UTC Only 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: - DualShock 4 and DualSense (and Edge), USB and Bluetooth, by their own report layouts, with rumble through their output reports; - any other HID gamepad or joystick by its usages: X/Y left stick, Z/Rz or Rx/Ry right stick, the hat as the D-pad, buttons in the usual DirectInput order, VICTORY_PAD_BUTTONS for other orders. 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 first and falls back to a HID pad in the same slot; Host::rumble reaches the HID pad's output reports. The focus gating (VICTORY_PAD_FOCUS) and the scripted key overlay now cover HID pads too. victory-hle gains the Win32_Devices_DeviceAndDriverInstallation and Win32_Devices_HumanInterfaceDevice windows-sys features. Ported from delacor/VIctory commit a9553ae72 (author marquezini) and its hid module, which is carried over unchanged; the gameinput.rs integration is adapted to this tree's host pad path. The source fork checked it with a DualSense on USB: every button, the triggers and both sticks over their whole range, and the rumble. Verified on this branch: cargo check --tests (msvc target) is clean; clippy has no warnings in the touched files; the hid module's unit tests pass under Wine (10 passed, 1 ignored - the one needs a real pad). Note: the xtask policy test `repository_passes_policy` already fails on main (crates/victory-shader/src/emit/lower.rs is 910329 bytes against the 655360-byte limit); this branch adds no new violation.
Only 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,
with rumble for the Sony pads. XInput's own HID devices are skipped;
an XInput pad keeps its slot, and a HID pad there moves to a free one.
VICTORY_PAD_BUTTONS names other button orders.

Ported from delacor/VIctory commit a9553ae72 (author marquezini) and its
hid module, carried over unchanged; the gameinput integration is adapted
to this tree. Checked on the source fork with a DualSense on USB, and
here by the module's unit tests under Wine.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 07:42:14 +00:00
github-bot referenced this pull request from a commit 2026-12-01 20:58:42 +00:00
github manually merged commit 72464fdba3 into main 2026-12-01 20:58:48 +00:00
github-bot referenced this pull request from a commit 2026-12-01 21:04:22 +00:00
github-bot referenced this pull request from a commit 2026-12-04 19:05:27 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.