SDL_SetRelativeMouseMode not hiding hardware mouse

SDL_SetRelativeMouseMode: I call this when the player enters gameplay. According to the docs, the hardware mouse should be hidden and relative movements should be reported. However, a lot of the time the hardware mouse is not hidden and can wander out of the game window and click on other things causing the game to lose focus.

Sometimes it seem to work fine. Using Win 10 and it happens on debug and release builds.

Any ideas?

Yeah it’s a bug, and I can’t remember if I’ve already reported or not (probably not). This happens after clicking on the title bar once, then the relative mouse mode will fail to prevent the cursor from exiting the window. It’s annoying when that happens but if you minimize/maximize the window it removes the problem.

Ah, thanks for the info. Makes some sense now.