Closed RGreenlees closed 12 months ago
If we do this it'll fix a bug with showcursor decrementing outside of a useful range when m_rawinput == 0
if (this->mFramesSinceEnteredTopdownMode > 2)
{
// Workaround for not being able to center mouse with raw input enabled.
if (CVAR_GET_FLOAT("m_rawinput") != 0)
{
if (SDL_GetRelativeMouseMode() != SDL_TRUE)
{
SDL_SetRelativeMouseMode(SDL_TRUE);
}
}
#ifdef WIN32
ShowCursor(TRUE);
#endif
}
else
{
this->mFramesSinceEnteredTopdownMode++;
}
Thanks Pierow, I've fixed that with a second commit on this PR
The pop-up menu and commander UI now centre the mouse cursor when opening, making it less confusing to use.