We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c44df6 commit 1475d4dCopy full SHA for 1475d4d
doc/news.rst
@@ -52,6 +52,8 @@ Fixed Bugs:
52
and fixed unit tests accordingly (issue #228).
53
* Fixed various unit tests on big-endian platforms (PR #232).
54
* Fixed 32-bit wraparound behaviour for ``SDL_TICKS_PASSED`` (PR #235).
55
+* Fixed ``SDL_MUSTLOCK`` to allow checking surface pointers in addition to
56
+ surfaces.
57
58
59
0.9.11
sdl2/surface.py
@@ -43,7 +43,10 @@
43
44
# Macros & inline functions
45
46
-SDL_MUSTLOCK = lambda s: ((s.flags & SDL_RLEACCEL) != 0)
+def SDL_MUSTLOCK(surf):
47
+ if hasattr(surf, "contents"):
48
+ surf = surf.contents
49
+ return surf.flags & SDL_RLEACCEL != 0
50
51
# Structs & opaque typedefs
0 commit comments