Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win-capture: Use DIP pixels for window capture #42

Open
wants to merge 3 commits into
base: patch-10
Choose a base branch
from

Conversation

SuslikV
Copy link
Owner

@SuslikV SuslikV commented Aug 28, 2018

Sets captured window size according to the current reported DPI setting
and adjusts cursor position.

For example, when system display scale set to 125%, the captured window
may has black bars at bottom and right under the Win10. Cursor position
always based on physical pixels, thus cursor position in the capture
becomes misaligned to the window.
This removes the black bars from the capture and recalculates cursor
position to align it to the window.

Set captured window size according to current reported DPI setting.

For example, when system display scale set to 125%, only reported
metric is adjusted, so the captured window has black bars at bottom
and right.
This removes the black bars from the capture.
Adjusts cursor position according to current reported DPI setting.

Cursor position always based on physical pixels. So, if system display
scale set, for example, to 125% - cursor position in the capture
becomes misaligned to the window.
This recalculates cursor position to align it to the window.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant