feat(victory): the mouse moves the camera on the stand-in pad again #461

Manually merged
github merged 1 commit from gh-pr/461/head into gh-pr/461/base 2026-11-27 00:35:27 +00:00
Owner

@⁠LooperSalty on GitHub · 2026-11-26 23:47 UTC · original
LooperSalty:feat/mouse-camera → main · +259 −11 · 3 files · 1 commits · merged 2026-11-27 00:27 UTC

Summary

Since #454 the mouse no longer moved the camera: Vice-Tay's stand-in pad (keyboard when no real pad is connected) had the right stick on I/J/K/L only. This ports the Neptune base's mouse back:

  • Movement = right stick (camera), right button = left trigger (aim), left button = right trigger (fire); added to the keys and clamped to -1..1, merged with a real pad (the furthest stick wins).
  • The pointer stays the user's until they click the game's picture (that click does not fire) or press F9; then the cursor is hidden and re-centred each read. F9 or losing focus gives it back.
  • Smoothing as on Neptune: stick = stick*0.8 + pixels*0.025*VICTORY_MOUSE (VICTORY_MOUSE scales it, default 1); up is positive.

New victory-hle/src/modules/mouse.rs (pure smooth/reading, Windows reader), wired through gameinput.rs (Source::mouse, fallback(keys, mouse)).

Test plan

  • 4 new tests, all failing without the port (gameinput 19, mouse 2)
  • cargo build --release -p victory, cargo build --release --workspace
  • Camera moved in a game run
  • CI

Source: previous third_party/victory (Neptune base, see THIRD_PARTY.md)

🤖 Generated with Claude Code

**@⁠LooperSalty** on GitHub · 2026-11-26 23:47 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/461) `LooperSalty:feat/mouse-camera` → `main` · +259 −11 · 3 files · 1 commits · merged 2026-11-27 00:27 UTC ## Summary Since #454 the mouse no longer moved the camera: Vice-Tay's stand-in pad (keyboard when no real pad is connected) had the right stick on I/J/K/L only. This ports the Neptune base's mouse back: - Movement = right stick (camera), right button = left trigger (aim), left button = right trigger (fire); added to the keys and clamped to -1..1, merged with a real pad (the furthest stick wins). - The pointer stays the user's until they click the game's picture (that click does not fire) or press F9; then the cursor is hidden and re-centred each read. F9 or losing focus gives it back. - Smoothing as on Neptune: `stick = stick*0.8 + pixels*0.025*VICTORY_MOUSE` (`VICTORY_MOUSE` scales it, default 1); up is positive. New `victory-hle/src/modules/mouse.rs` (pure `smooth`/`reading`, Windows reader), wired through `gameinput.rs` (`Source::mouse`, `fallback(keys, mouse)`). ## Test plan - [x] 4 new tests, all failing without the port (gameinput 19, mouse 2) - [x] `cargo build --release -p victory`, `cargo build --release --workspace` - [ ] Camera moved in a game run - [ ] CI Source: previous `third_party/victory` (Neptune base, see THIRD_PARTY.md) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Ported from the Neptune base (previous third_party/victory, see
THIRD_PARTY.md). With no real pad the stand-in pad now reads the mouse:
right button = left trigger (aim), left button = right trigger (fire),
movement = right stick (-1..1, up positive), added to the I/J/K/L keys
and clamped. It merges with host pads through `further` as before.

The pointer is taken by a click on the picture (or F9), hidden and put
back at the picture's middle after each reading; movement is smoothed
over a few readings. F9 or losing focus lets it go, and the cursor is
never touched while the window is not in front.

Switch: VICTORY_MOUSE=<scale> (default 1) multiplies the movement.

New modules/mouse.rs holds the pure parts (smoothing, clamping) and the
Windows reader; gameinput.rs gets Source::mouse and fallback(keys, mouse).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:35:27 +00:00
github manually merged commit 401953e192 into gh-pr/461/base 2026-11-27 00:35:27 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 23:47 UTC · original

Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-26T23:47:05.572741Z
We couldn’t complete this review. Comment @codex review to try again.
401953e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 23:47 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/461#issuecomment-7205855851) <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"401953e192dd5bc57ff8fa11290cb9645b994463","has_any_findings":true,"has_unresolved_findings":true,"status":"failed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ❌ Failed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ❌ **Failed** <relative-time datetime="2026-11-26T23:47:05.572741Z">2026-11-26T23:47:05.572741Z</relative-time><br/>We couldn’t complete this review. Comment `@codex review` to try again. | `401953e` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 23:47 UTC · original

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 23:47 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/461#issuecomment-7205856268) You have reached your Codex usage limits for code reviews. You can see your limits in the [Codex usage dashboard](https://chatgpt.com/codex/cloud/settings/usage). To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your [settings](https://chatgpt.com/settings/code-review).
This discussion has been locked. Commenting is limited to contributors.
No description provided.