HLE: write at-rest gamepad state for non-pad readings #574
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!574
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-574"
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?
@Quat3rnion on GitHub · 2026-11-24 05:10 UTC · original
Quat3rnion:victory-gameinput-callbacks→main· +30 −8 · 1 files · 1 commits · openWhat
IGameInputReading::GetGamepadStatemust write default at-rest values andreturn
falsewhen the reading has no gamepad. The shim returnedfalsewithout touching the caller's buffer, so a title reusing one
PadStatecould keep a held button or displaced stick after switching to keyboard
input. The state is now written in both cases; pad readings still write
their real state and return
true.An AI tool wrote part of this change.
Tested
cargo test --workspace: 165 passed, 0 failed, 3 ignored. A regression seeds aPadStatewith pressed buttons and moved sticks, calls slot0xb0on a keyboard reading, and asserts bothfalseandPadState::default().cargo check --target x86_64-pc-windows-gnu --workspace --testspasses. No Windows host here.cargo xtask policypasses (150 files ok). No game files or data from them were added.Checklist
cargo xtask policypasses. No game files or data from them were added.@geiyiliyabumo on GitHub · 2026-11-24 12:21 UTC · original
Independent verification & code review on Windows 11 x64 MSVC (merged onto
mainffe310e):Checks Run
cargo xtask policy: PASS (154 files ok)cargo clippy -p victory-hle --all-targets --locked -- -D warnings(default +--features diagnostics): PASS (0 warnings)cargo test -p victory-hle --locked -- gameinput: PASS (8/8tests, includinga_keyboard_reading_resets_the_gamepad_state_it_is_given)Review
Looks clean and ready to merge —
gamepad_stateproperly guardsout.is_null(), writesPadState::default()on non-pad readings so reused caller buffers don't retain stale buttons/axes, and returnsfalse(or writes real state and returnstrueforValue::Pad).AI-assisted; synthetic tests only, no game files.
@Marvisak on GitHub · 2026-11-25 01:16 UTC · original
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-hle/src/modules/gameinput.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
253b9db4a8to015d59a21e@mercuryVM on GitHub · 2026-11-24 08:30 UTC · original · approved these changes
Tested c70c478 on Windows 11, RTX 5070, MSVC:
cargo test --workspace --no-fail-fastpasses (265 passed, 0 failed), includinga_keyboard_reading_resets_the_gamepad_state_it_is_given.IGameInputReading::GetGamepadStatefills the struct with at-rest values and returnsfalsewhen the reading has no gamepad, so writingPadState::default()there matches it. A title that reuses its buffer can no longer keep a stale held button. A nulloutstill returnsfalsewithout writing.No issues found.
AI-assisted (Claude Code).
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.