Closed anonymousvic closed 1 year ago
GetSystemMetrics
is for Windows, not GNU/Linux.
Also, please fill the issue template, I cannot help without information.
Also, the latest release is 6.1.0. 3.2.0 is quite old.
Also, the latest release is 6.1.0. 3.2.0 is quite old.
Sorry, I pressed the "enter" with incaution when I was filling the template, and I'm filling it now.
What is the resolution set on the monitor? 2560x1600 seems appropriate with 175% scale. 🤔
What is the resolution set on the monitor? 2560x1600 seems appropriate with 175% scale. 🤔
My monitor size is 13 inches and the resolution is 2560x1600, so I set 175% scale to make everything bigger
mss
instance will set High DPI awareness = PROCESS_PER_MONITOR_DPI_AWARE. So before using mss, the PROCESS is NOT DPI aware, you got 1463x914. Once mss instance created, the PROCESS is DPI aware, then you got the actual resolution 2560x1600.
What's more, during the full lifecycle of PROCESS, DPI awareness can be only set once programmatically or in manifest. Although Windows10 introduces Mixed-Mode DP-aware and support THREAD DPI awareness?
For more details: https://docs.microsoft.com/en-us/windows/win32/hidpi/setting-the-default-dpi-awareness-for-a-process
Thanks @narumishi :) @anonymousvic this is not a bug indeed.
General information:
OS name: Windows 10
OS version: 20H2
OS architecture: 64 bits
Resolutions:
Python version: 3.8.5
MSS version: 6.1.0
Description of the warning/error
Neither
Full message
Other details
First python code is below:
It can return the right resolution: 1463x914
Second python code is below:
It returns: 2560x1600
GetSystemMetrics gives the wrong resolution after taking a screen shot by mss