Fallback to PER_MONITOR_AWARE

This commit is contained in:
Andrew Murray 2024-11-08 07:30:09 +11:00
parent f68219713c
commit 7763350f07

View File

@ -368,6 +368,8 @@ PyImaging_GrabScreenWin32(PyObject *self, PyObject *args) {
if (dpiAwarenessContext != NULL) {
dpiAwareness =
SetThreadDpiAwarenessContext_function(dpiAwarenessContext);
} else {
dpiAwareness = SetThreadDpiAwarenessContext_function((HANDLE)-3);
}
} else {
// DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE = ((DPI_CONTEXT_HANDLE)-3)