Cursor "teleports" during camera turn

Issue: The cursor position abruptly changes after turning the camera.
Crash (y/n): No.
Platform (Windows/Mac/Linux): Windows 10 Pro
Description: Right-clicking to turn the camera mostly works as expected. However, the cursor continues to move while it is hidden for the camera-turn action. This can result in the cursor appearing at an unexpected (but ultimately logical) location within the game window afterwards. Cursor movement is limited to the game window, whether in fullscreen or windowed mode.
Expected Behavior: The cursor position remains fixed while the camera is moving, or is immediately and invisibly reset upon the completion of the camera turn.

I 100% agree with your “expected behaviour”, and it’s also how SDL2’s documentation says relative mouse mode’s functionality is supposed to work.

It used to work correctly on Windows, and be broken on OS X and Linux, so I put a hack in to make it work on OS X and Linux, but now it seems that Windows has broken it to match OS X and Linux. So… at least everybody’s broken the same way, now. :smiley:

The upshot is that I can just enable my OS X/Linux workaround for Windows as well, and it should handle this, too. This will be included in tonight’s new build.

For those who like source code, the relevant patch is here.