Input: the mouse as the stand-in pad's camera (VICTORY_MOUSE) #1157
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1157"
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?
Imported from Marvisak/VIctory. Originally posted by h0useadv on 2026-11-24T16:18:02Z.
The keyboard's stand-in gamepad has no way to look around smoothly: I/J/K/L only give the right stick full deflection or none. This adds the mouse to that pad, opt-in.
What
VICTORY_MOUSE(1, or a sensitivity such as0.5or2; unset, empty or0is off). While the title's window has focus, the mouse adds to the stand-in pad:How
Source::mouse(), a default method returning no mouse, so the test fake and the non-Windows host are unchanged.with_mouse(pad, mouse), a pure function applied to the stand-in pad inState::poll.GetWindowRectof the focused window,GetCursorPos, thenSetCursorPosback to the centre; buttons throughGetAsyncKeyState(VK_LBUTTON,VK_RBUTTON). Onlywindows-sysfeatures the crate already enables.Tested
cargo test -p victory-hle --lib: 96 passed. Two new tests:with_mouse(adding, clamping, buttons, no mouse leaves the pad unchanged), and through the hub with the fake host (the mouse reaches the stand-in pad, and is gone once a real pad connects).cargo clippy -p victory-hle --all-targets: no warnings.cargo xtask policy: 154 files OK. rustfmt: the new code is formatted; the file's three existing rustfmt differences are untouched.VICTORY_MOUSE=1): focus on the title's window, cursor held exactly at its centre, menus at 30 fps; the cursor is free again once the title closes. I didn't get as far as a scene where the camera could be checked visually; the world doesn't render on my card yet.AI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:08Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
d67e37d:cargo test -p victory-hlepasses, 97 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:17:50Z.
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
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.