From 0d77c76738760244cf5e3439caa3084e4c756f6b Mon Sep 17 00:00:00 2001 From: Salman Alshamrani Date: Fri, 22 Nov 2024 22:02:43 -0500 Subject: [PATCH] Reorder code --- osu.Framework/Input/UserInputManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Framework/Input/UserInputManager.cs b/osu.Framework/Input/UserInputManager.cs index 4c5de68114..2d2cbf6314 100644 --- a/osu.Framework/Input/UserInputManager.cs +++ b/osu.Framework/Input/UserInputManager.cs @@ -87,9 +87,6 @@ private bool mouseOutsideAllDisplays(Vector2 mousePosition) { Point windowLocation; - float scale = Host.Window is ISDLWindow window ? window.Scale : 1; - mousePosition /= scale; - switch (Host.Window.WindowMode.Value) { case WindowMode.Windowed: @@ -101,6 +98,9 @@ private bool mouseOutsideAllDisplays(Vector2 mousePosition) break; } + float scale = Host.Window is ISDLWindow window ? window.Scale : 1; + mousePosition /= scale; + int x = (int)MathF.Floor(windowLocation.X + mousePosition.X); int y = (int)MathF.Floor(windowLocation.Y + mousePosition.Y);