Skip to content

fix(cursor): keep the zoomed view on a game-drawn cursor (#443) - #444

Merged
Maxaubert merged 1 commit into
mainfrom
fix/game-cursor-wobble
Oct 10, 2026
Merged

Maxaubert merged 1 commit into
mainfrom
fix/game-cursor-wobble

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Closes #443.

What. Games that hide the Windows pointer and draw their own cursor (Cyberpunk 2077 menus) showed that cursor wobbling in the zoomed view. While a foreground app that covers the monitor hides the pointer, Wind now turns DWM centring off and follows the pointer one display frame late (gameCursorLagMs, -1 = one frame, 0 = off, ini only). The pointer itself is never moved. Locked mouselook and normal windows are unchanged.

Why. Measured on this PC: the game draws its cursor 1-2 display frames behind the pointer. DWM centring shows the newest pointer, so at 6.5x the game cursor swung 40-70 px behind each movement and flipped side on each change of direction. Wind's own write without a delay measured the same as DWM centring, so the delay is what helps.

Measured (Cyberpunk main menu, 6.5x, 144 fps capture, pointer sweeps; rms offset of the game cursor from its rest point on screen):

Sweep Before (gameCursorLagMs=0) After (default)
1000 desktop px/s, 3 runs 50 / 53 / 56 px 15 / 15 / 23 px
400 desktop px/s 29 px 6 px

What remains (sd 8-10 px at 1000 px/s) is the game's own frame timing.

Tests. build.bat test: 617 passed, 0 failed (new tests/test_game_cursor.cpp, config clamp test). build.bat check clean apart from the existing fopen warnings. No UI change. Signed UIAccess build deployed and measured on this PC.

Version 0.29.0 -> 0.29.1 (fix). Unsigned in CI as usual.

🤖 Generated with Claude Code

https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu

Games that hide the pointer and draw their own cursor (Cyberpunk 2077 menus) show it about a
display frame late, while DWM centring shows the newest pointer, so the cursor wobbled in the
zoomed view. While a covering app hides the pointer, Wind writes the view itself and follows the
pointer gameCursorLagMs late (default one display frame). Measured at 6.5x: rms 53 -> 15-23 px at
1000 px/s, 29 -> 6 px at 400 px/s.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu
@Maxaubert
Maxaubert merged commit 0a33419 into main Oct 10, 2026
1 check passed
@Maxaubert
Maxaubert deleted the fix/game-cursor-wobble branch October 10, 2026 22:39
Maxaubert added a commit that referenced this pull request Oct 11, 2026
…443) (#447)

Review of #444/#446:
- The game-drawn cursor mode switched on for any covering window that hides the pointer (a video
  player's idle hide, hiding while typing), handing the view to Wind and moving it by DWM's pixel.
  It now switches on only while the hidden pointer moves (GameCursorStep).
- Warm pulses follow who writes the view (!dc.freeCursor), so they run with a game-drawn cursor and
  in the hold after Inspect.
- The pointer history is cleared at session start.
- The pan_glide.h include comment had moved onto game_cursor.h.


Claude-Session: https://claude.ai/code/session_011zPmivSAQeivGUdBjTsaMu

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Game-drawn cursor wobbles in the zoomed view (Cyberpunk 2077)

1 participant