Skip to content

Commit

Permalink
Reorder code
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzibyte committed Nov 23, 2024
1 parent c0145f4 commit 0d77c76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions osu.Framework/Input/UserInputManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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);

Expand Down

0 comments on commit 0d77c76

Please sign in to comment.