diff options
author | Marcel Moreaux <marcel@moreaux.nl> | 2021-07-19 11:04:31 +0200 |
---|---|---|
committer | jaseg <136313+jaseg@users.noreply.github.com> | 2021-07-28 12:37:55 +0200 |
commit | b5f03dd2b7d55b9a632c8771be4ae1a05c2f7fb8 (patch) | |
tree | cddef98beb59dad862fdc172645114212b3963bf | |
parent | 03e847d8a1c83d0b29a96420095c31298c71cd45 (diff) | |
download | python-mpv-b5f03dd2b7d55b9a632c8771be4ae1a05c2f7fb8.tar.gz python-mpv-b5f03dd2b7d55b9a632c8771be4ae1a05c2f7fb8.tar.bz2 python-mpv-b5f03dd2b7d55b9a632c8771be4ae1a05c2f7fb8.zip |
Fix handling of c_void_p args in MpvRenderParam.__init__()
Handling of c_void_p args (x11_display, wl_display) was broken.
Added a case to correctly handle the c_void_p constructor case.
See https://github.com/jaseg/python-mpv/issues/169
-rw-r--r-- | mpv.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -225,6 +225,9 @@ class MpvRenderParam(Structure): elif cons is bool: self.value = c_int(int(bool(value))) self.data = cast(pointer(self.value), c_void_p) + elif cons is c_void_p: + self.value = value + self.data = cast(self.value, c_void_p) else: self.value = cons(**value) self.data = cast(pointer(self.value), c_void_p) |