forked from auracaster/bumble_mirror
fix libusb loading on Windows
This commit is contained in:
@@ -46,8 +46,9 @@ def load_libusb():
|
||||
when usb1.USBContext is created.
|
||||
'''
|
||||
if libusb_path := libusb_package.get_library_path():
|
||||
logger.debug(f'loading libusb library at {libusb_path}')
|
||||
dll_loader = ctypes.WinDLL if platform.system() == 'Windows' else ctypes.CDLL
|
||||
libusb_dll = dll_loader(libusb_path, use_errno=True, use_last_error=True)
|
||||
libusb_dll = dll_loader(str(libusb_path), use_errno=True, use_last_error=True)
|
||||
usb1.loadLibrary(libusb_dll)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user