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

Open
delacor wants to merge 4 commits from upstream-pr/1786 into main
delacor commented 2026-11-24 22:32:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by delacor on 2026-11-24T22:32:31Z.


Summary

  • Port HID controller support from fxceless/victory-fork#68, preserving the original authorship. DualShock 4 and DualSense pads and generic HID gamepads occupy free slots after XInput.
  • Port fxceless/victory-fork#74 so the keyboard remains usable with a controller connected. There are no new runtime dependencies.

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.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6592738004 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1786). Originally posted by [delacor](https://github.com/delacor) on 2026-11-24T22:32:31Z. --- ## Summary - Port HID controller support from fxceless/victory-fork#68, preserving the original authorship. DualShock 4 and DualSense pads and generic HID gamepads occupy free slots after XInput. - Port fxceless/victory-fork#74 so the keyboard remains usable with a controller connected. There are no new runtime dependencies. 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.
catminou4 commented 2026-11-24 23:03:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:03:35Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:Marvisak/VIctory:review:6048803258 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1786#pullrequestreview-6048803258). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T23:03:35Z. **Review:** COMMENTED --- 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.
DesertGamer commented 2026-11-24 23:05:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-24T22:34:42Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7146397777 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1786#issuecomment-7146397777). Originally posted by [DesertGamer](https://github.com/DesertGamer) on 2026-11-24T22:34:42Z. --- ### 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). :warning: 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.*
Marvisak commented 2026-11-25 02:06:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:36:15Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149739396 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1786#issuecomment-7149739396). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:36:15Z. --- <!-- victory-triage v1 head=8388232659a77fb51d98e3daa312c86328538e09 verdict=needs-rebase at=2026-11-25T22:27:00Z --> 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](https://claude.ai/code)_
delacor commented 2026-11-26 14:01:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by delacor on 2026-11-26T13:55:42Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7194032043 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1786#issuecomment-7194032043). Originally posted by [delacor](https://github.com/delacor) on 2026-11-26T13:55:42Z. --- lol I can rebase this on a hourly base :D Will do it again in a few hours
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1786:upstream-pr/1786'
git switch 'upstream-pr/1786'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/1786'
git switch 'upstream-pr/1786'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1786'
git switch 'upstream-pr/1786'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1786'
git switch 'main'
git merge --squash 'upstream-pr/1786'
git switch 'main'
git merge --ff-only 'upstream-pr/1786'
git switch 'main'
git merge 'upstream-pr/1786'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!1785
No description provided.