Fix snapping after closing menu

This commit is contained in:
BenCat07 2020-09-02 21:09:22 +02:00 committed by LightCat
parent 2a7787e49e
commit 9a29df6262

View File

@ -192,6 +192,10 @@ bool gui::handleSdlEvent(SDL_Event *event)
{
g_ISurface->LockCursor();
g_ISurface->SetCursorAlwaysVisible(false);
// Ensure we don't snap after closing the menu by deactivating and
// reactivating the mouse, which causes it to fully reset
g_IInput->DeactivateMouse();
g_IInput->ActivateMouse();
}
return true;
}