mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-27 04:36:40 +00:00
Merge pull request #2365 from chewitt/atvclient-macmini
atvclient: add support for macmini and macbook ir sensors
This commit is contained in:
commit
0c86d58570
@ -0,0 +1,31 @@
|
|||||||
|
--- a/src/atvclient.cpp
|
||||||
|
+++ b/src/atvclient.cpp
|
||||||
|
@@ -24,8 +24,16 @@
|
||||||
|
|
||||||
|
#include "xbmcclient.h"
|
||||||
|
|
||||||
|
-#define VENDOR_APPLE 0x05ac
|
||||||
|
-#define PRODUCT_IR 0x8241
|
||||||
|
+#define VENDOR_APPLE 0x05ac
|
||||||
|
+#define PRODUCT_APPLE_IR_0 0x8240
|
||||||
|
+#define PRODUCT_APPLE_IR_1 0x8241
|
||||||
|
+#define PRODUCT_APPLE_IR_2 0x8242
|
||||||
|
+
|
||||||
|
+#define IS_APPLE_REMOTE(dev) ((dev->descriptor.idVendor == VENDOR_APPLE) && \
|
||||||
|
+ ((dev->descriptor.idProduct == PRODUCT_APPLE_IR_0) || \
|
||||||
|
+ (dev->descriptor.idProduct == PRODUCT_APPLE_IR_1) || \
|
||||||
|
+ (dev->descriptor.idProduct == PRODUCT_APPLE_IR_2)))
|
||||||
|
+
|
||||||
|
|
||||||
|
#define LEDMODE_OFF 0
|
||||||
|
#define LEDMODE_AMBER 1
|
||||||
|
@@ -264,8 +272,7 @@ static usb_dev_handle *find_ir(void)
|
||||||
|
|
||||||
|
for (bus = usb_busses; bus; bus = bus->next) {
|
||||||
|
for (dev = bus->devices; dev; dev = dev->next)
|
||||||
|
- if (dev->descriptor.idVendor == VENDOR_APPLE
|
||||||
|
- && dev->descriptor.idProduct == PRODUCT_IR)
|
||||||
|
+ if(IS_APPLE_REMOTE(dev))
|
||||||
|
return usb_open(dev);
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user