KBM: fix camera whip on focus regain, add absolute mouse support #1052
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1059"
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 ivall/xcl. Originally posted by saurabhbhoir456 on 2026-11-24T11:04:05Z.
Add unit tests for all three fixes.
What is in it
Tested
cargo test --workspace -- --test-threads=4: N passed, N failed, N ignored (SKIPPED GPU tests: …)Regression run
main:
PR:
Not tested
AI use
Imported from ivall/xcl. Originally posted by ettehn on 2026-11-24T13:28:10Z.
On
b11945f,rustfmt --edition 2021 --check crates/xcl/src/hle/kbm.rsreports an unexpected closing}. There is an extra brace betweenmouse_reset_clears_last_absandfocus_loss_resets_mouse_velocity_and_wheel_state. SeveralMouse { ... }initializers also omitlast_abs.For #962, a single shared
last_abscan 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.
Imported from ivall/xcl. Originally posted by throny on 2026-11-25T00:51:15Z.
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.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T02:13:42Z.
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.origin(refs/pull/1059/head):54d51d71de6d3790b464ff3357785814cfd29279origin/main:aaa093657bd96a146c05c0c1a9b61149fe761453git merge-tree --write-tree origin/main HEADexited 0 and returned tree3d0cfa8c88979de8a7b3f03e57b505b583805fc9. Build and test commands used the clean, detached PR head.Tested
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 --workspaceandcargo test --workspace --no-runboth exited 101.cargo test -p xcl --lib hle::kbm::tests -- --show-outputexited 101 before running any tests.cargo test --workspace --no-fail-fast -- --test-threads=4 --show-outputexited 101 after acquiring the Arc A770 test lock. The lock was released. Full output is inL:\XclTooling\neon-slot-2\tmp\pr1059-suite.log.crates/xcl/src/hle/kbm.rs:661. The diff adds a standalone closing brace at line 618 just beforefocus_loss_resets_mouse_velocity_and_wheel_state.SKIPPEDlines.Not tested
AI use
gemini-4-neon) verified the compiler error inpr1059-suite.logand published this report.Imported from ivall/xcl. Originally posted by winne42 on 2026-11-25T07:00:25Z.
At head
733f42bthis PR does not compile, not even the library (cargo check -p xcl --target x86_64-pc-windows-gnu):There is an extra
}after the newmouse_reset_clears_last_abstest, which closesmod testsearly. Once that is fixed, theMouse { … }literals inon_message,applyandfocus_loss_resets_mouse_velocity_and_wheel_statestill lack the newlast_absfield.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).Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T09:05:47Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:error: unexpected closing delimiter: '}'atcrates/xcl/src/hle/kbm.rs:661(extra}after the tests module). Fails on the PR head itself, not a merge artifact.— Devin
Imported from ivall/xcl. Originally posted by ruben2s on 2026-11-25T21:48:22Z.
@saurabhbhoir456 this is slop
Imported from ivall/xcl. Originally posted by gut0to on 2026-11-26T17:03:40Z.
Code review location:
crates/xcl/src/hle/kbm.rs; line 325Could the absolute coordinates be converted to display coordinates before these differences are added to
DX/DY? ForMOUSE_MOVE_ABSOLUTE,lLastX/lLastYare normalized to 0–65535, not pixel deltas; Windows also usesMOUSE_VIRTUAL_DESKTOPto select the coordinate surface. Treating these values as relative counts makes sensitivity depend heavily on display resolution and can produce a huge velocity when the pointer moves across the surface. Please map absolute positions to screen coordinates before computing deltas and add tests for both coordinate surfaces. AI-assisted review: I checked the WindowsRAWMOUSEdefinition, but I did not run tests.Pull request closed