More attempts to fix MacOS

failbranch
Phil Taylor 2023-02-06 17:52:47 +00:00
rodzic 3d053c3c96
commit 5654fa524e
3 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -18,5 +18,7 @@
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.device.usb</key>
<true/>
</dict>
</plist>

Wyświetl plik

@ -47,7 +47,7 @@ void usbController::init()
else {
#if defined(__APPLE__) && HID_API_VERSION >= HID_API_MAKE_VERSION(0, 12, 0)
hid_darwin_set_open_exclusive(1);
hid_darwin_set_open_exclusive(0);
#endif
qInfo(logUsbControl()) << "Found available HID devices (not all will be suitable for use):";

Wyświetl plik

@ -22,6 +22,14 @@
#include "hidapi.h"
#endif
#ifndef HID_API_MAKE_VERSION
#define HID_API_MAKE_VERSION(mj, mn, p) (((mj) << 24) | ((mn) << 8) | (p))
#endif
#ifndef HID_API_VERSION
#define HID_API_VERSION HID_API_MAKE_VERSION(HID_API_VERSION_MAJOR, HID_API_VERSION_MINOR, HID_API_VERSION_PATCH)
#endif
#if defined(__APPLE__) && HID_API_VERSION >= HID_API_MAKE_VERSION(0, 12, 0)
#include <hidapi/hidapi_darwin.h>
#endif