bpo-33656: Add enum name for argument of Windows call. (GH-7642) · python/cpython@afa1ea5

Original file line numberDiff line numberDiff line change

@@ -9,10 +9,13 @@

99

"Your Python may not be configured for Tk. **", file=sys.__stderr__)

1010

raise SystemExit(1)

1111
12+

# Valid arguments for the ...Awareness call below are defined in the following.

13+

# https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx

1214

if sys.platform == 'win32':

1315

import ctypes

16+

PROCESS_SYSTEM_DPI_AWARE = 1

1417

try:

15-

ctypes.OleDLL('shcore').SetProcessDpiAwareness(1)

18+

ctypes.OleDLL('shcore').SetProcessDpiAwareness(PROCESS_SYSTEM_DPI_AWARE)

1619

except (AttributeError, OSError):

1720

pass

1821