Skip to content

Commit

Permalink
Factor scale in UserInputManager.mouseOutsideAllDisplays
Browse files Browse the repository at this point in the history
The mouse position is in pixel/client coordinates, while
window and displays positions are in window coordinates.
  • Loading branch information
Susko3 committed Nov 22, 2024
1 parent dc98996 commit c0145f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions osu.Framework/Input/UserInputManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ 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 Down

0 comments on commit c0145f4

Please sign in to comment.