Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 56b59f1

Browse files
committed
[backport] Windows: use our own instances of GDI32 and User32 DLLs
1 parent f06dea3 commit 56b59f1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ History:
22

33
<see Git checking messages for history>
44

5+
4.0.3 2019/xx/xx
6+
- Windows: use our own instances of GDI32 and User32 DLLs (backported from 5.0.0)
7+
58
4.0.2 2019/02/23
69
- new contributor: foone
710
- Windows: ignore missing SetProcessDPIAware() on Window XP

mss/windows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def __init__(self):
7777
INT, DWORD, DWORD, ctypes.POINTER(RECT), DOUBLE
7878
)
7979

80-
self.user32 = ctypes.windll.user32
81-
self.gdi32 = ctypes.windll.gdi32
80+
self.user32 = ctypes.WinDLL("user32")
81+
self.gdi32 = ctypes.WinDLL("gdi32")
8282
self._set_cfunctions()
8383

8484
# Set DPI aware to capture full screen on Hi-DPI monitors

0 commit comments

Comments
 (0)