From 5773dc47f4b8cec4fce00bb969c825871a204275 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 26 Mar 2026 23:52:24 +0100 Subject: [PATCH] Restore no cursor clipping in Locked mode on non-SDL input to avoid issues --- Source/Engine/Engine/Screen.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Engine/Engine/Screen.cpp b/Source/Engine/Engine/Screen.cpp index 4faaeb685..db9e67aa9 100644 --- a/Source/Engine/Engine/Screen.cpp +++ b/Source/Engine/Engine/Screen.cpp @@ -155,6 +155,7 @@ void Screen::SetCursorLock(CursorLockMode mode) bool inRelativeMode = Input::Mouse->IsRelative(); if (mode == CursorLockMode::Clipped) win->StartClippingCursor(bounds); +#if PLATFORM_SDL else if (mode == CursorLockMode::Locked) { // Use mouse clip region to restrict the cursor in one spot @@ -162,6 +163,10 @@ void Screen::SetCursorLock(CursorLockMode mode) } else if (CursorLock == CursorLockMode::Locked || CursorLock == CursorLockMode::Clipped) win->EndClippingCursor(); +#else + else if (CursorLock == CursorLockMode::Clipped) + win->EndClippingCursor(); +#endif // Enable relative mode when cursor is restricted if (mode != CursorLockMode::None)