mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 10:16:17 +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");
|
)GetProcAddress(user32, "GetWindowDpiAwarenessContext");
|
||||||
DPI_AWARENESS_CONTEXT dpiAwarenessContext =
|
DPI_AWARENESS_CONTEXT dpiAwarenessContext =
|
||||||
GetWindowDpiAwarenessContext_function(wnd);
|
GetWindowDpiAwarenessContext_function(wnd);
|
||||||
if (dpiAwarenessContext != NULL) {
|
if (GetWindowDpiAwarenessContext_function != NULL && dpiAwarenessContext != NULL) {
|
||||||
dpiAwareness =
|
dpiAwareness =
|
||||||
SetThreadDpiAwarenessContext_function(dpiAwarenessContext);
|
SetThreadDpiAwarenessContext_function(dpiAwarenessContext);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user