From bcbc73c023aeaf25370fdd87c9afa51c40dc0d35 Mon Sep 17 00:00:00 2001 From: Ati1707 <152104750+Ati1707@users.noreply.github.com> Date: Tue, 6 Aug 2024 15:57:29 +0200 Subject: [PATCH] Add winmode to CDLL --- mpv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpv.py b/mpv.py index 94eeb85..8971492 100644 --- a/mpv.py +++ b/mpv.py @@ -38,7 +38,7 @@ dll = ctypes.util.find_library('mpv-2.dll') or ctypes.util.find_library('libmpv-2.dll') or ctypes.util.find_library('mpv-1.dll') if dll is None: raise OSError('Cannot find mpv-1.dll, mpv-2.dll or libmpv-2.dll in your system %PATH%. One way to deal with this is to ship the dll with your script and put the directory your script is in into %PATH% before "import mpv": os.environ["PATH"] = os.path.dirname(__file__) + os.pathsep + os.environ["PATH"] If mpv-1.dll is located elsewhere, you can add that path to os.environ["PATH"].') - backend = CDLL(dll) + backend = CDLL(dll, winmode=0) fs_enc = 'utf-8' else: import locale