atvclient: update sources to address #3190

This commit is contained in:
Christian Hewitt 2014-05-07 19:13:11 +04:00
parent 289ccc9bb7
commit 6400294831
2 changed files with 2 additions and 33 deletions

View File

@ -17,12 +17,12 @@
################################################################################
PKG_NAME="atvclient"
PKG_VERSION="0.1"
PKG_VERSION="50faf80"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://github.com/Evinyatar/atvclient/wiki"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain libusb-compat"
PKG_PRIORITY="optional"
PKG_SECTION="system/remote"

View File

@ -1,31 +0,0 @@
--- 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);
}