This commit is contained in:
stefnotch
2021-02-09 22:10:43 +01:00
parent 05a7b911f1
commit 01f2cc1dcc

View File

@@ -1198,7 +1198,7 @@ namespace FlaxEditor
var win = Windows.GameWin.Root;
if (win != null && win.RootWindow is WindowRootControl root && root.Window.IsFocused)
{
pos = Vector2.Round(Windows.GameWin.Viewport.PointFromWindow(root.Window.ScreenToClient(pos)));
pos = Vector2.Round(Windows.GameWin.Viewport.PointFromScreen(pos) * root.DpiScale);
}
else
{
@@ -1218,7 +1218,7 @@ namespace FlaxEditor
var win = Windows.GameWin.Root;
if (win != null && win.RootWindow is WindowRootControl root && root.Window.IsFocused)
{
pos = Vector2.Round(root.Window.ClientToScreen(Windows.GameWin.Viewport.PointToWindow(pos)));
pos = Vector2.Round(Windows.GameWin.Viewport.PointToScreen(pos / root.DpiScale));
}
else
{