KBM: fix camera whip on focus regain, add absolute mouse support #1059

Open
github-bot wants to merge 4 commits from github-bot/gh-1059 into main AGit
Owner

@⁠saurabhbhoir456 on GitHub · 2026-11-24 11:04 UTC · original
saurabhbhoir456:main → main · +97 −5 · 2 files · 4 commits · open

  • Issue #963: Use real dt for velocity rate calculation, clamp only for smoothing
  • Issue #962: Add last_abs field for absolute mouse coordinate delta calculation
  • Issue #961: Canonicalize game_root path in VFS (handles UNC paths)

Add unit tests for all three fixes.

What is in it

Tested

  • hardware (GPU + driver, CPU), Rust version, debug / release:
  • cargo test --workspace -- --test-threads=4: N passed, N failed, N ignored (SKIPPED GPU tests: …)

Regression run

main:

PR:

Not tested

AI use

  • none / tool and model, and what it did
**@⁠saurabhbhoir456** on GitHub · 2026-11-24 11:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/1059) `saurabhbhoir456:main` → `main` · +97 −5 · 2 files · 4 commits · open - Issue #963: Use real dt for velocity rate calculation, clamp only for smoothing - Issue #962: Add last_abs field for absolute mouse coordinate delta calculation - Issue #961: Canonicalize game_root path in VFS (handles UNC paths) Add unit tests for all three fixes. <!-- What changes and why, in a few sentences. "Fixes #N" / "Part of #N". Stacked: "Stacked on #N". --> **What is in it** - **Tested** - hardware (GPU + driver, CPU), Rust version, debug / release: - `cargo test --workspace -- --test-threads=4`: N passed, N failed, N ignored (SKIPPED GPU tests: …) **Regression run** <!-- Required when the PR changes crates/xcl/src outside tests: `scripts/smoke.ps1` on a real title, built from main and from this PR's head commit (no uncommitted changes); paste both blocks. Rerun the PR's after every push. Not needed for docs / tests / scripts only. --> main: PR: **Not tested** - **AI use** - none / tool and model, and what it did
- Issue #963: Use real dt for velocity rate calculation, clamp only for smoothing
- Issue #962: Add last_abs field for absolute mouse coordinate delta calculation
- Issue #961: Canonicalize game_root path in VFS (handles UNC paths)

Add unit tests for all three fixes.

Co-Authored-By: Claude Code <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:42:12 +00:00
Author
Owner

@⁠ettehn on GitHub · 2026-11-24 13:28 UTC · original

On b11945f, rustfmt --edition 2021 --check crates/xcl/src/hle/kbm.rs reports an unexpected closing }. There is an extra brace between mouse_reset_clears_last_abs and focus_loss_resets_mouse_velocity_and_wheel_state. Several Mouse { ... } initializers also omit last_abs.

For #962, a single shared last_abs can produce a large delta when two devices report alternately. Raw Input absolute positions are normalized over the primary screen or virtual desktop, so converting to pixels and keeping a separate baseline per device would address both cases.

OpenAI Codex (GPT-6.2 Sol) assisted with verification.

**@⁠ettehn** on GitHub · 2026-11-24 13:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/1059#issuecomment-7132873666) On `b11945f`, `rustfmt --edition 2021 --check crates/xcl/src/hle/kbm.rs` reports an unexpected closing `}`. There is an extra brace between `mouse_reset_clears_last_abs` and `focus_loss_resets_mouse_velocity_and_wheel_state`. Several `Mouse { ... }` initializers also omit `last_abs`. For #962, a single shared `last_abs` can produce a large delta when two devices report alternately. Raw Input absolute positions are normalized over the primary screen or virtual desktop, so converting to pixels and keeping a separate baseline per device would address both cases. OpenAI Codex (GPT-6.2 Sol) assisted with verification.
Author
Owner

@⁠throny on GitHub · 2026-11-25 00:51 UTC · original

Two contributors checked independently and found that #1066 #1522 solves the same problem (for #963) in a different way: #1607, group D66. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

**@⁠throny** on GitHub · 2026-11-25 00:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/1059#issuecomment-7148954419) <!-- xcl-1607-hint:D66 --> Two contributors checked independently and found that #1066 #1522 solves the same problem (for #963) in a different way: #1607, group D66. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 02:13 UTC · original

PR #1059 verification

KBM changes mouse velocity smoothing after long input gaps and adds absolute mouse handling. The PR diff also changes UNC game-root canonicalization in crates/xcl/src/vfs.rs.

  • PR head fetched from origin (refs/pull/1059/head): 54d51d71de6d3790b464ff3357785814cfd29279
  • Fetched origin/main: aaa093657bd96a146c05c0c1a9b61149fe761453
  • git merge-tree --write-tree origin/main HEAD exited 0 and returned tree 3d0cfa8c88979de8a7b3f03e57b505b583805fc9. Build and test commands used the clean, detached PR head.

Tested

  • STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave range 8–32, DoublePrecisionFloatShaderOps=0). Rust rustc 1.100.0 (0ef1bc386 2026-11-09). Debug build and test profiles with debug info and incremental compilation disabled. Configured DXC/DXIL 1.9.2609.5.
  • cargo build --workspace and cargo test --workspace --no-run both exited 101.
  • cargo test -p xcl --lib hle::kbm::tests -- --show-output exited 101 before running any tests.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output exited 101 after acquiring the Arc A770 test lock. The lock was released. Full output is in L:\XclTooling\neon-slot-2\tmp\pr1059-suite.log.
  • All four commands stopped on an unexpected closing delimiter at crates/xcl/src/hle/kbm.rs:661. The diff adds a standalone closing brace at line 618 just before focus_loss_resets_mouse_velocity_and_wheel_state.
  • Zero tests executed. Cargo emitted no passed, failed, or ignored totals and no SKIPPED lines.

Not tested

  • Runtime and GPU behavior, interactive focus regain, absolute mouse input, UNC game-root canonicalization, and retail-title smoke comparisons on main and the PR head. Compilation blocked test execution.

AI use

  • T3 Code / Codex (gpt-6.2-sol) ran the build and test commands and drafted this report. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified the compiler error in pr1059-suite.log and published this report.
**@⁠JJAutoCompare** on GitHub · 2026-11-25 02:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/1059#issuecomment-7150466776) # PR #1059 verification KBM changes mouse velocity smoothing after long input gaps and adds absolute mouse handling. The PR diff also changes UNC game-root canonicalization in `crates/xcl/src/vfs.rs`. - PR head fetched from `origin` (`refs/pull/1059/head`): `54d51d71de6d3790b464ff3357785814cfd29279` - Fetched `origin/main`: `aaa093657bd96a146c05c0c1a9b61149fe761453` - `git merge-tree --write-tree origin/main HEAD` exited 0 and returned tree `3d0cfa8c88979de8a7b3f03e57b505b583805fc9`. Build and test commands used the clean, detached PR head. **Tested** - STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave range 8–32, DoublePrecisionFloatShaderOps=0). Rust `rustc 1.100.0 (0ef1bc386 2026-11-09)`. Debug build and test profiles with debug info and incremental compilation disabled. Configured DXC/DXIL 1.9.2609.5. - `cargo build --workspace` and `cargo test --workspace --no-run` both exited 101. - `cargo test -p xcl --lib hle::kbm::tests -- --show-output` exited 101 before running any tests. - `cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output` exited 101 after acquiring the Arc A770 test lock. The lock was released. Full output is in `L:\XclTooling\neon-slot-2\tmp\pr1059-suite.log`. - All four commands stopped on an unexpected closing delimiter at `crates/xcl/src/hle/kbm.rs:661`. The diff adds a standalone closing brace at line 618 just before `focus_loss_resets_mouse_velocity_and_wheel_state`. - Zero tests executed. Cargo emitted no passed, failed, or ignored totals and no `SKIPPED` lines. **Not tested** - Runtime and GPU behavior, interactive focus regain, absolute mouse input, UNC game-root canonicalization, and retail-title smoke comparisons on main and the PR head. Compilation blocked test execution. **AI use** - T3 Code / Codex (gpt-6.2-sol) ran the build and test commands and drafted this report. Coordinator #2 (T3 Code / Antigravity, `gemini-4-neon`) verified the compiler error in `pr1059-suite.log` and published this report.
Author
Owner

@⁠winne42 on GitHub · 2026-11-25 07:00 UTC · original

At head 733f42b this PR does not compile, not even the library (cargo check -p xcl --target x86_64-pc-windows-gnu):

error: unexpected closing delimiter: `}`
   --> crates/xcl/src/hle/kbm.rs:661:1

There is an extra } after the new mouse_reset_clears_last_abs test, which closes mod tests early. Once that is fixed, the Mouse { … } literals in on_message, apply and focus_loss_resets_mouse_velocity_and_wheel_state still lack the new last_abs field.

Checked on Linux, Wine 10.0, Rust 1.98.1 (x86_64-pc-windows-gnu), as part of the D66 check on #1607. Written with Claude Code (Claude Opus 5.5).

**@⁠winne42** on GitHub · 2026-11-25 07:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/1059#issuecomment-7155386332) At head `733f42b` this PR does not compile, not even the library (`cargo check -p xcl --target x86_64-pc-windows-gnu`): ``` error: unexpected closing delimiter: `}` --> crates/xcl/src/hle/kbm.rs:661:1 ``` There is an extra `}` after the new `mouse_reset_clears_last_abs` test, which closes `mod tests` early. Once that is fixed, the `Mouse { … }` literals in `on_message`, `apply` and `focus_loss_resets_mouse_velocity_and_wheel_state` still lack the new `last_abs` field. Checked on Linux, Wine 10.0, Rust 1.98.1 (`x86_64-pc-windows-gnu`), as part of the D66 check on #1607. Written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 09:05 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • Does not compile: error: unexpected closing delimiter: '}' at crates/xcl/src/hle/kbm.rs:661 (extra } after the tests module). Fails on the PR head itself, not a merge artifact.

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-25 09:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/1059#issuecomment-7157868127) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - **Does not compile**: `error: unexpected closing delimiter: '}'` at `crates/xcl/src/hle/kbm.rs:661` (extra `}` after the tests module). Fails on the PR head itself, not a merge artifact. — Devin
Author
Owner

@⁠ruben2s on GitHub · 2026-11-25 21:48 UTC · original

@⁠saurabhbhoir456 this is slop

**@⁠ruben2s** on GitHub · 2026-11-25 21:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/1059#issuecomment-7175562103) @⁠saurabhbhoir456 this is slop
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1059/head:github-bot/gh-1059'
git switch 'github-bot/gh-1059'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1059'
git switch 'github-bot/gh-1059'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1059'
git switch 'github-bot/gh-1059'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1059'
git switch 'main'
git merge --squash 'github-bot/gh-1059'
git switch 'main'
git merge --ff-only 'github-bot/gh-1059'
git switch 'main'
git merge 'github-bot/gh-1059'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.