Skip to content

Input: support DualShock 4 over HID and preserve keyboard controls - #1786

Open
delacor wants to merge 4 commits into
Marvisak:mainfrom
delacor:input/dualshock4-hid
Open

delacor wants to merge 4 commits into
Marvisak:mainfrom
delacor:input/dualshock4-hid

Conversation

@delacor

@delacor delacor commented Nov 24, 2026

Copy link
Copy Markdown

Summary

Related upstream work includes #150, #1517, and #312. The hardware confirmed in this report is a wired DualShock 4.

Validation

  • The original fork build detected the physical DualShock 4 through Wine 11.0 Staging on Linux, and the reporter confirmed it worked in-game.
  • On the upstream port, all 18 automated GameInput tests passed under Wine. Windows-target Clippy passed with default and all features for victory-hle, and the four asset-policy tests passed.

Stale-frame result from the same Linux run

The reporter also confirmed that setting VICTORY_TEXTURE_GUARD=0 on the fxceless fork stopped the stale-frame overlay in the first cutscene after loading. The fork's texture guard can miss writes through an alias and defer rehashing. Upstream already hashes the texture contents during refresh, so this PR has no renderer diff. The fork's discussion and follow-up are in fxceless/victory-fork#63 and fxceless/victory-fork#159.

@DesertGamer

Copy link
Copy Markdown

VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

@catminou4 catminou4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static review only: victory-hle is Windows-only — nothing compiles or runs on macOS; source review of the diff.

DualShock 4 over HID with keyboard controls preserved: 47K input-layer diff — largest HLE PR this wave; HID report parsing needs a real DS4 to validate, keyboard fallback path is the regression risk.

Marvisak commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Needs rebase. This PR no longer merges cleanly into main: main has moved since the last triage, and the branch now conflicts in crates/victory-hle/src/modules/gameinput.rs. It will be reviewed again once it is rebased onto current main.

Previous verdict for this head: merge candidate (with a scope decision for the maintainer).


Generated by Claude Code

@delacor

delacor commented Nov 26, 2026

Copy link
Copy Markdown
Author

lol I can rebase this on a hourly base :D
Will do it again in a few hours

marquezinii and others added 3 commits November 26, 2026 16:55
Only XInput pads reached the title, so a DualSense or 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 HID and fill the slots XInput 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. Checked with a DualSense on
USB, read both ways: every button, the triggers and both sticks over their
whole range, and the rumble.

(cherry picked from commit a9553ae)
@delacor
delacor force-pushed the input/dualshock4-hid branch from 8388232 to f8b52eb Compare November 26, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants