mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 02:06:18 +03:00
Fallback to PER_MONITOR_AWARE if GetWindowDpiAwarenessContext is not available
Co-authored-by: Ondrej Baranovič <ondreko.tiba@gmail.com>
This commit is contained in:
parent
7763350f07
commit
a44b3067b0
|
@ -365,7 +365,7 @@ PyImaging_GrabScreenWin32(PyObject *self, PyObject *args) {
|
|||
)GetProcAddress(user32, "GetWindowDpiAwarenessContext");
|
||||
DPI_AWARENESS_CONTEXT dpiAwarenessContext =
|
||||
GetWindowDpiAwarenessContext_function(wnd);
|
||||
if (dpiAwarenessContext != NULL) {
|
||||
if (GetWindowDpiAwarenessContext_function != NULL && dpiAwarenessContext != NULL) {
|
||||
dpiAwareness =
|
||||
SetThreadDpiAwarenessContext_function(dpiAwarenessContext);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user