Fix snapping after closing menu
This commit is contained in:
parent
2a7787e49e
commit
9a29df6262
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user