Mouse camera control: locked cursor, button edges, smoothed right-stick deltas #377

Closed
ztsvvstz1337 wants to merge 656 commits from upstream-pr/377 into main
ztsvvstz1337 commented 2026-11-27 20:58:23 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by ztsvvstz1337 on 2026-11-27T20:58:23Z.


Adds mouse camera control to the keyboard stand-in pad in victory-hle.

  • Mouse deltas become the fallback pad's right stick through a smoothed 45 ms half-life (MouseLook), with base sensitivity 0.022 and a [-1, 1] clamp.
  • LMB, RMB and MMB press RT, LT and R3, with edge capture so a button held on window chrome or another app does not fire when dragged into the client area.
  • The cursor is recentred at the client centre every 8 ms while the title window is focused and hidden through the lifecycle WM_SETCURSOR hook. F2 toggles the lock; Esc or P releases it for menus. Focus loss or an inactive stand-in disarms it.
  • VICTORY_MOUSE_LOOK is on by default (=0 disables it); VICTORY_MOUSE_SENS and VICTORY_MOUSE_INVERT_Y=1 override sensitivity and Y direction.
  • The switches and controls are documented in docs/README-fxceless.md.

This is the current local implementation and complements the earlier mouse-look work in #256: #256 maps focused mouse motion and confines the pointer, while this adds cursor hiding, edge-captured buttons and the smoothed delta path.

Verification on this branch based on main 0148258:

  • cargo test -p victory-hle --locked: 223 library tests passed, 3 ignored; mouse_look.rs integration tests 33/33 passed; dlss/fidelityfx/no_dll integrations also passed.
  • cargo clippy -p victory-hle --all-targets --locked -- -D warnings: clean.

In-game camera behaviour was not recorded here; the evidence is the unit/integration suite.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5533012440 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/377). Originally posted by [ztsvvstz1337](https://github.com/ztsvvstz1337) on 2026-11-27T20:58:23Z. --- Adds mouse camera control to the keyboard stand-in pad in `victory-hle`. - Mouse deltas become the fallback pad's right stick through a smoothed 45 ms half-life (`MouseLook`), with base sensitivity 0.022 and a `[-1, 1]` clamp. - LMB, RMB and MMB press RT, LT and R3, with edge capture so a button held on window chrome or another app does not fire when dragged into the client area. - The cursor is recentred at the client centre every 8 ms while the title window is focused and hidden through the lifecycle `WM_SETCURSOR` hook. **F2** toggles the lock; **Esc** or **P** releases it for menus. Focus loss or an inactive stand-in disarms it. - `VICTORY_MOUSE_LOOK` is on by default (`=0` disables it); `VICTORY_MOUSE_SENS` and `VICTORY_MOUSE_INVERT_Y=1` override sensitivity and Y direction. - The switches and controls are documented in `docs/README-fxceless.md`. This is the current local implementation and complements the earlier mouse-look work in #256: #256 maps focused mouse motion and confines the pointer, while this adds cursor hiding, edge-captured buttons and the smoothed delta path. Verification on this branch based on `main` `0148258`: - `cargo test -p victory-hle --locked`: 223 library tests passed, 3 ignored; `mouse_look.rs` integration tests 33/33 passed; dlss/fidelityfx/no_dll integrations also passed. - `cargo clippy -p victory-hle --all-targets --locked -- -D warnings`: clean. In-game camera behaviour was not recorded here; the evidence is the unit/integration suite.
TaynanGT commented 2026-11-29 11:37:44 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-29T11:37:44Z.


Thanks for the implementation and the test results. The follow-up in #220 supports the smoothed camera path on a virtual-pad setup. Before expanding it, please check mouse-button triggers, cursor release on focus loss and F2/Esc, and interaction with a real controller. The integration suite is not a substitute for those input checks.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7255241296 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/377#issuecomment-7255241296). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-29T11:37:44Z. --- Thanks for the implementation and the test results. The follow-up in #220 supports the smoothed camera path on a virtual-pad setup. Before expanding it, please check mouse-button triggers, cursor release on focus loss and F2/Esc, and interaction with a real controller. The integration suite is not a substitute for those input checks.
TaynanGT commented 2026-11-30 17:10:52 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-30T17:10:52Z.


main has moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the current main and open a new PR; I'll review it there.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7285845983 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/377#issuecomment-7285845983). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-30T17:10:52Z. --- `main` has moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the current `main` and open a new PR; I'll review it there.

Pull request closed

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
TaynanGT/Vice-Tay!377
No description provided.