So I cannot find anything to help me with this issue, it's driving me bonkers.
Using Windows Input Simulator (C# SendInput Wrapper - Simulate Keyboard and Mouse)
When users of my software happen to have a non standard 100% windows scaling InputSimulator.Mouse.MoveMouseTo(toX, toY);
is thrown off, moving to an incorrect location.
How i'm currently calculating:
int toX = (int)((65535.0f * (newX / (float)screen.Bounds.Width)) + 0.5f);
int toY = (int)((65535.0f * (newY / (float)screen.Bounds.Height)) + 0.5f);
If a user has scaling set to 125% for example, how would i calculate the correct 100% scaling location?
Thanks in advance.