Skip to content

Commit

Permalink
Fallback to PER_MONITOR_AWARE if GetWindowDpiAwarenessContext is not …
Browse files Browse the repository at this point in the history
…available

Co-authored-by: Ondrej Baranovič <[email protected]>
  • Loading branch information
radarhere and nulano authored Nov 7, 2024
1 parent 7763350 commit a44b306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a44b306

Please sign in to comment.