Skip to content

Commit

Permalink
update retina scale
Browse files Browse the repository at this point in the history
  • Loading branch information
EqUiNoX-Labs committed Jul 16, 2024
1 parent a559e96 commit 512789d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Repackinator/UI/ImGuiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public unsafe ImGuiController(Window window)
_hdpiScale = new Vector2(scaleX, scaleY);
}

//_retinaScale = new Vector2(window.Width / (float)window.Size.X, window.Height / (float)window.Size.Y);
_retinaScale = new Vector2(window.FramebufferSize.X / window.Width);

int major = GL.GetInteger(GetPName.MajorVersion);
int minor = GL.GetInteger(GetPName.MinorVersion);
Expand Down Expand Up @@ -450,7 +450,7 @@ private void UpdateImGuiInput(GameWindow wnd)
//var screenPoint = new Vector2i((int)MouseState.X, (int)MouseState.Y);
//var point = screenPoint;//wnd.PointToClient(screenPoint);
//io.MousePos = new System.Numerics.Vector2(point.X, point.Y);
io.MousePos = new Vector2((int)MouseState.X, (int)MouseState.Y);// / GetScaleFactor();
io.MousePos = new Vector2((int)MouseState.X, (int)MouseState.Y) / _hdpiScale;

foreach (Keys key in Enum.GetValues(typeof(Keys)))
{
Expand Down

0 comments on commit 512789d

Please sign in to comment.