lolp1 / Overlay.NET

An easy-to-use overlay library written in C# by Jacob Kemple.
730 stars 87 forks source link

Misalignment of overlay with high dpi #5

Closed factormystic closed 7 years ago

factormystic commented 7 years ago

I was only able to get the WPF demo working, but that demonstrates the problem. Moving or resizing the window, the corresponding adjustment of the overlay is off by (apparently) the dpi scale factor.

slow-down commented 7 years ago

you mean the dpi of your screen or your mouse? for me it looks right

lolp1 commented 7 years ago

I need more details. The full code used for the overlay that produces the bug and circumstances that it happens in. Otherwise I can not reproduce it and fix it on my end because I do not have this issue.

factormystic commented 7 years ago

Screen DPI. Here's an example screencap at 150%. When I drag notepad, the overlay is translating more than the window is actually moving. I'm not talking about the jitter, I think that may be due in part to my screencap software. I'm just talking about how the alignment is different when I move notepad.

lolp1 commented 7 years ago

That looks like an update rate issue. Can you try running it at a higher frame rate and see what it does?

factormystic commented 7 years ago

It's not, the lag is an artifact of the screen capture. Just look at whats happening in each corner. Here's a comparison:

corner2

corner1

lolp1 commented 7 years ago

I have had no other reports of the described issue, and have been unable to reproduce the issue testing it on both x86 and x64 windows 10 platforms in various processes using the demo.

For this reason, I am going to close the issue for now. I did just recently update the project, so feel free to try again and if the issue still persist reopen the issue with more information if possible. Windows version (preferably the current upgrade patch it is on as well), process architecture (x86 or x64) and any relevant debugging attempts, and full code if not using the stock demo would be ideal. Thanks.