SleddingMouseFix
Fixes multi-second freezes during mouse movement with high polling rate mice (2kHz+). Worst frame measured: 6713ms -> 20ms.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. |
