Sledding Game
Install with App

Details

Latest version
1.0.0
Last Updated
First Uploaded
Downloads
34
Likes
0
Size
9.4KB
Dependants

Categories

Sledding Mouse Stutter Fix

Fixes the multi-second freezes that happen while moving the mouse, if you use a high polling-rate mouse (1000 Hz+). The game locks up until you stop moving.

Measured effect: worst frame during heavy mouse movement went from 6,713 ms → 20 ms.

Client-side only. Safe in multiplayer — it changes nothing for other players.

What causes it

The game's window has mouse-in-pointer mode enabled. Every mouse report triggers a WM_NCHITTEST window message, and letting that message reach the default handling re-enters the message pump and generates more hit-tests — a self-amplifying storm that scales with your mouse's polling rate. At 2 kHz this was measured at over 80,000 window messages/second and a single frame lasting 6.7 seconds.

The fix

Answers WM_NCHITTEST directly for points inside the game window's client area, without letting it re-enter. Everything else (border dragging, resizing) is untouched.

Settings

UserData/MelonPreferences.cfg:

Key Default Meaning
Enabled true Set false to disable the fix without removing the mod.
LogStats false Log how many hit-tests were handled every 10s.

Source, full write-up, and a clean drop-in fix for the developer

github.com/mitchellcairns/sledding-mouse-fix

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.