From 84ada182990bc1e6cb858b17b975b83a4268c76e Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Mon, 21 Apr 2025 23:06:40 +0300 Subject: [PATCH] Fix unlock mouse hotkey not unlocking CursorLockMode.Locked cursor --- Source/Editor/Windows/GameWindow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/Windows/GameWindow.cs b/Source/Editor/Windows/GameWindow.cs index 935ca9686..3558eecd0 100644 --- a/Source/Editor/Windows/GameWindow.cs +++ b/Source/Editor/Windows/GameWindow.cs @@ -1061,7 +1061,7 @@ namespace FlaxEditor.Windows _cursorVisible = Screen.CursorVisible; _cursorLockMode = Screen.CursorLock; Screen.CursorVisible = true; - if (Screen.CursorLock == CursorLockMode.Clipped) + if (Screen.CursorLock == CursorLockMode.Clipped || Screen.CursorLock == CursorLockMode.Locked) Screen.CursorLock = CursorLockMode.None; // Defocus