HLE: a mouse device, so the camera follows the mouse #9
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!9
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-9"
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?
@superboynick on GitHub · 2026-11-26 18:37 UTC · original
superboynick:feat/mouse-device→main· +172 −22 · 2 files · 1 commits · merged 2026-11-26 18:50 UTCGameInput in this layer offers four XInput pads, a stand-in pad driven by the keyboard, and the keyboard - but no mouse. The title polls GameInput for mouse movement, reads nothing, and the camera never turns while the keyboard works. Measured on an RTX 5070 Ti Laptop (12 GB, 32-lane waves), Windows 11.
What this adds. A mouse device that reports position deltas taken from the host cursor inside our own window, plus the three buttons. It exists only while our window is in the foreground (GetForegroundWindow is our process) and goes away with a disconnect callback when focus leaves, so moving the pointer elsewhere does not spin the camera. Wheel rotation is not reported: GetAsyncKeyState cannot see it, and that is written in the commit.
Switch. VICTORY_GAMEPAD_MOUSE=0 leaves the device out entirely, which is what the layer did before; default is on.
Evidence. In a run with the window in front the device appears (input device device=6 kind=32 connected=true) and does not appear while another window has focus; a 240-second run with it showed no change in frame rate (the poll is every 8 ms) and no errors.
Tests. cargo test -p victory-hle: 153 passed, 2 ignored. Four new unit tests cover the first frame (zero delta), clamping outside the client area, negative deltas, and the focus-loss reset. Both cargo build --release -p victory and cargo build --profile diag -p victory --features diagnostics build.
Written with an AI assistant.
@superboynick on GitHub · 2026-11-26 18:46 UTC · original
Separate observation from the same runs: texture re-uploads and skin corruption
Issues are disabled on this repository, so I am putting this here rather than in a new issue; move or
discard it as you see fit. Everything below is from this branch at
0ef2b99(plus this PR's mousedevice), diagnostics build, the
play-nvidiaspeed set plusVICTORY_RENDER_SCALE=0.4,VICTORY_TEXTURE_ROOM_PERCENT=70,VICTORY_WINDOWS_BAR_MB=1024, on an RTX 5070 Ti Laptop (12 GB,32-lane waves), 31.4 GB RAM, Windows 11, Series 1.0.2.1.
The picture is correct (no fog, no black spots) and the world runs at about 9.2-9.8 fps for 30-45
minutes without a crash. What remains is occasional texture/skin corruption: a character's skin
sometimes shows as rainbow-coloured or pixelated bands for a moment.
One 160-second window, counted by message (
VICTORY_LOG=warn), with the one switch changed:VICTORY_TEXTURE_NO_WAITa texture picked by index changed after its upload with nothing to tell of itplaced unordered texture view not mirrored1(the speed set)0Waiting for the remapping cuts that message by 56% and costs about 18% of the frame rate, which
matches the README's own explanation for "rainbow, pixelated skin" - and also shows that waiting is
not the whole story, since 39 lines remain.
Two smaller things from the same logs, in case they are useful:
placed unordered texture view not mirrored (null: writes through it are lost)for a dozen placed 2D textures, withtimesreaching2048, so at least that many bindings land on a null slot; and 29 lines of
a pipeline creation method that is not implemented: the title goes without this pipeline shape.Full log excerpt with byte-exact lines and
file:linefor each message is available on request; itis long, so I left it out of this comment.
Written with an AI assistant.
@ardgndg on GitHub · 2026-11-27 20:28 UTC · original
doesn't work when I enable mouse capture through f1