Skip to content

Commit 09e6fdb

Browse files
committed
Windows: less locals
1 parent 430dad7 commit 09e6fdb

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
# built documents.
6060
#
6161
# The short X.Y version.
62-
version = '2.0.12'
62+
version = '2.0.13'
6363
# The full version, including alpha/beta/rc tags.
6464
release = 'latest'
6565

mss/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from .exception import ScreenshotError
1616
from .factory import mss
1717

18-
__version__ = '2.0.12'
18+
__version__ = '2.0.13'
1919
__author__ = "Mickaël 'Tiger-222' Schoentgen"
2020
__copyright__ = '''
2121
Copyright (c) 2013-2016, Mickaël 'Tiger-222' Schoentgen

mss/windows.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ def get_pixels(self, monitor):
121121

122122
self.width = monitor['width']
123123
self.height = monitor['height']
124-
left, top = monitor['left'], monitor['top']
125124
srcdc = None
126125
memdc = None
127126
bmp = None
@@ -144,8 +143,11 @@ def get_pixels(self, monitor):
144143
bmp = windll.gdi32.CreateCompatibleBitmap(srcdc, self.width,
145144
self.height)
146145
windll.gdi32.SelectObject(memdc, bmp)
147-
windll.gdi32.BitBlt(memdc, 0, 0, self.width, self.height, srcdc,
148-
left, top, 0xCC0020) # 0xCC0020 = SRCCOPY
146+
windll.gdi32.BitBlt(memdc, 0, 0,
147+
self.width, self.height,
148+
srcdc,
149+
monitor['left'], monitor['top'],
150+
0xcc0020) # SRCCOPY
149151
bits = windll.gdi32.GetDIBits(memdc, bmp, 0, self.height,
150152
image_data, bmi, 0)
151153
if bits != self.height:

0 commit comments

Comments
 (0)