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

System zoom issue #2865

Closed
2 tasks
BraveMomo opened this issue Dec 7, 2021 · 12 comments
Closed
2 tasks

System zoom issue #2865

BraveMomo opened this issue Dec 7, 2021 · 12 comments

Comments

@BraveMomo
Copy link

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: [e.g. Debian, Windows, macOS...]
  • scrcpy version: [e.g. 1.12.1]
  • installation method: [e.g. manual build, apt, snap, brew, Windows release...]
  • device model:
  • Android version: [e.g. 10]

Describe the bug
A clear and concise description of what the bug is.

On errors, please provide the output of the console (and adb logcat if relevant).

Please paste terminal output in a code block.

Please do not post screenshots of your terminal, just post the content as text instead.

The resolution of my computer is very high, so the zoom ratio of the system is enlarged to 175%. At this time, the screen projection interface opened by scrcpy does not zoom with the system. This problem makes me very uncomfortable. Please repair and optimize it as soon as possible

@rom1v rom1v changed the title The resolution of my computer is very high, so the zoom ratio of the system is enlarged to 175%. At this time, the screen projection interface opened by scrcpy does not zoom with the system. This problem makes me very uncomfortable. Please repair and optimize it as soon as possible System zoom issue Dec 7, 2021
@rom1v
Copy link
Collaborator

rom1v commented Dec 7, 2021

Please post a screenshot, I'm not sure to understand the problem.

@BraveMomo
Copy link
Author

Please post a screenshot, I'm not sure to understand the problem.

0OND%}RLKF)2PY150X}M{}7

@BraveMomo
Copy link
Author

Please post a screenshot, I'm not sure to understand the problem.

O QF74MB4@62~KKQ7PVT(S1

@rom1v
Copy link
Collaborator

rom1v commented Dec 7, 2021

https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#the-quality-is-low

scrcpy.exe > Properties > Compatibility > Change high DPI settings > Override high DPI scaling behavior > Scaling performed by: Application.

@BraveMomo
Copy link
Author

https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#the-quality-is-low

scrcpy.exe > Properties > Compatibility > Change high DPI settings > Override high DPI scaling behavior > Scaling performed by: Application.

This is indeed a way, but every time I download a new version of scrcpy, I need to reset these things. It's very uncomfortable. It's best that the software itself can adapt to the scaling of resolution

@rom1v
Copy link
Collaborator

rom1v commented Dec 14, 2021

Sure. But I don't know how to do it.

The solutions often talk about some "manifest", but they assume the app is built with VisualStudio: https://stackoverflow.com/a/46433887/1987178

I also found: https://stackoverflow.com/a/51748836/1987178

But I have no real Windows to test this. Help welcome.

@rom1v
Copy link
Collaborator

rom1v commented Dec 15, 2021

It is recommended that you set the process-default DPI awareness via application manifest. See Setting the default DPI awareness for a process for more information. Setting the process-default DPI awareness via API call can lead to unexpected application behavior.

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setprocessdpiawarenesscontext

Is it possible to use this "application manifest" the way scrcpy is built? Or is it specific to microsoft tools?

Otherwise, maybe we can still call SetProcessDpiAwarenessContext() and see if it works.

(cc @Biswa96 and @npes87184, as Windows users+developers you might have a clue 😉)

@Biswa96
Copy link
Contributor

Biswa96 commented Dec 16, 2021

Is it possible to use this "application manifest" the way scrcpy is built?

It is possible to use tools in gcc or llvm. I know some projects that uses DPI awareness

Let me reproduce the issue like OP.

rom1v added a commit that referenced this issue Dec 18, 2021
@rom1v
Copy link
Collaborator

rom1v commented Dec 18, 2021

Thank you, now I think I know how to do it: windows_dpi_awareness (6312ea9)

@BraveHL Could you please test this binary:

  • scrcpy.exe sha256:0d60faa4ada0fa3a25e320babc21d5daa475218dc5fb9c8fceaa5ac2afba0ec3

@Helaer
Copy link

Helaer commented Dec 20, 2021

Thank you, now I think I know how to do it: windows_dpi_awareness (6312ea9)

@BraveHL Could you please test this binary:

  • scrcpy.exe sha256:0d60faa4ada0fa3a25e320babc21d5daa475218dc5fb9c8fceaa5ac2afba0ec3

@rom1v I did the test for you and it worked very well.

@rom1v
Copy link
Collaborator

rom1v commented Dec 20, 2021

Thank you @Helaer 👍

After your message, I was wondering how to test in practice, but I finally found: in my Windows VM I set scaling to 150% in Settings > System > Display, then I run scrcpy, and it works correctly 🎉 Indeed, without the fix, the result is awful 😱

rom1v added a commit that referenced this issue Dec 20, 2021
@rom1v
Copy link
Collaborator

rom1v commented Dec 20, 2021

ad11c5b merged into dev.

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

No branches or pull requests

4 participants