Source: https://shadowfrag.com/blog/mouse-at-speed/

# Why grabbing the mouse changed the frame rate

By the SHADOWFRAG developer · Technology · Nov 8, 2026 · 2 min read

An SDL update fixed the slowdown when SHADOWFRAG grabbed the mouse on Wayland. I also checked whether the same mouse movement turns the view by the same angle at different [frame rates](https://shadowfrag.com/glossary/#term-frames-per-second).

[SHADOWFRAG’s Mouse settings show aim sensitivity, physical mouse DPI and optional acceleration.](https://ds9.dynostatic.com/media.php?id=01M7YE88FFAV324VQ6YTPGCXKJ&revision=1)

The in-game settings used to enter measured mouse DPI and read the distance for a full turn. Captured November 7, 2026.

A timed [benchmark](https://shadowfrag.com/glossary/#term-benchmark) in SHADOWFRAG never grabs the mouse. That mattered on November 5. On one Linux setup, the game could draw 144 [frames per second](https://shadowfrag.com/glossary/#term-frames-per-second) with the cursor released, then fall to about 72 when it captured the mouse for aiming. An unattended run could miss the moment the problem began.

I could reproduce the drop on Sun Aqueduct by releasing the cursor and grabbing it again. That Linux desktop used Wayland, and SHADOWFRAG received its mouse input through a library called SDL. The slowdown was a known SDL issue on Wayland. Updating SDL fixed it without any changes to the game engine.

## Checking where a turn lands

The [input loop](https://shadowfrag.com/blog/vulkan-and-the-input-loop/) has another job. If the mouse sends the same movement, the view should finish at the same angle even if the reports arrive in a different rhythm. On November 8 I replayed 4,096 mouse counts across 80 synthetic traces. A count is a small unit of movement reported by the mouse. With acceleration off, changing the event rate and the way events were grouped into frames produced the same final turn. Half zoom sensitivity produced half the angle.

You can enter your measured DPI in Mouse settings, decimals included. That lets the game show the desk distance needed for a full turn. Typing a different DPI there changes the calculation on screen. The mouse still sends the same counts for the same sweep unless you change its own settings. The replay tests the arithmetic. Measuring the delay from a physical mouse to a lit pixel takes different equipment.

[Back to blog](https://shadowfrag.com/blog/)[Browse the glossary](https://shadowfrag.com/glossary/)

## Request an _invite code._

SHADOWFRAG is opening by invitation. Request a code and receive development updates. [Shadow Council](https://shadowfrag.com/glossary/#term-shadow-council) contributors receive priority when invitations begin.

Enable JavaScript to request an invite code and confirm your email address.

Email confirmation required. Codes will be issued later; a request does not guarantee access. Unsubscribe at any time. [Privacy](https://shadowfrag.com/privacy/)

Confirm your email to join the invitation list. Codes will be issued in a future round; a request does not guarantee access. Unsubscribe at any time.

Anyone can request a code. For [Shadow Council](https://shadowfrag.com/shadow-council/) priority, introduce yourself on Discord with your role, experience, region and time zone. Include examples of your maps or content if you have them.

[Join Discord](https://discord.gg/XzRsgpwWAp)
