Fix restoring locked cursor state when window gains focus again

This commit is contained in:
2025-03-31 23:25:38 +03:00
parent d355f9eff5
commit c1f76abc22
5 changed files with 22 additions and 2 deletions

View File

@@ -1179,9 +1179,10 @@ namespace FlaxEditor.Windows
_cursorVisible = Screen.CursorVisible;
_cursorLockMode = Screen.CursorLock;
// Restore cursor visibility (could be hidden by the game)
// Restore cursor state, could be hidden or locked by the game
if (!_cursorVisible)
Screen.CursorVisible = true;
Screen.CursorLock = CursorLockMode.None;
}
}