aboutsummaryrefslogtreecommitdiff
path: root/tools/EventClients
diff options
context:
space:
mode:
authorMaestroDD <MaestroDD@svn>2009-12-10 16:31:20 +0000
committerMaestroDD <MaestroDD@svn>2009-12-10 16:31:20 +0000
commit8df7dc0ca01b50820ed378779b6a6c304d092989 (patch)
tree30a180e485f4eb65929102b977af0375625ac98a /tools/EventClients
parent9ccfe09f0b1a0a98779e09dfc2fd563eab8b2c12 (diff)
[OSX] XBMCHelper: added support for new alumium remote play + play_hold events
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@25525 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'tools/EventClients')
-rw-r--r--tools/EventClients/Clients/OSXRemote/XBMCHelper.m19
-rw-r--r--tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.h5
-rw-r--r--tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm6
3 files changed, 22 insertions, 8 deletions
diff --git a/tools/EventClients/Clients/OSXRemote/XBMCHelper.m b/tools/EventClients/Clients/OSXRemote/XBMCHelper.m
index 44f9502bd0..a3d4d35f36 100644
--- a/tools/EventClients/Clients/OSXRemote/XBMCHelper.m
+++ b/tools/EventClients/Clients/OSXRemote/XBMCHelper.m
@@ -158,11 +158,16 @@
[mp_wrapper handleEvent:ATV_BUTTON_MENU];
}
break;
- case kHIDRemoteButtonCodeUpHold:
- //TODO
+ case kHIDRemoteButtonCodePlay: //aluminium remote
+ if(isPressed) {
+ [mp_wrapper handleEvent:ATV_BUTTON_PLAY];
+ }
break;
- case kHIDRemoteButtonCodeDownHold:
- //TODO
+// case kHIDRemoteButtonCodeUpHold:
+// //TODO
+// break;
+// case kHIDRemoteButtonCodeDownHold:
+// //TODO
break;
case kHIDRemoteButtonCodeLeftHold:
if(isPressed)
@@ -185,8 +190,10 @@
[mp_wrapper handleEvent:ATV_BUTTON_MENU_H];
}
break;
- case kHIDRemoteButtonCodePlayHold:
- //TODO
+ case kHIDRemoteButtonCodePlayHold: //aluminium remote
+ if(isPressed) {
+ [mp_wrapper handleEvent:ATV_BUTTON_PLAY_H];
+ }
break;
default:
NSLog(@"Oha, remote button not recognized %i pressed/released %i", buttonCode, isPressed);
diff --git a/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.h b/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.h
index 60c1d8e459..7c78ef7920 100644
--- a/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.h
+++ b/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.h
@@ -49,7 +49,10 @@ typedef enum{
ATV_LEARNED_FORWARD_RELEASE, //>=ATV 2.3
ATV_LEARNED_RETURN,
ATV_LEARNED_ENTER,
- ATV_INVALID_BUTTON
+ ATV_INVALID_BUTTON,
+ //new aluminium remote buttons
+ ATV_BUTTON_PLAY,
+ ATV_BUTTON_PLAY_H,
} eATVClientEvent;
diff --git a/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm b/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm
index 3475f2191d..dc1e128445 100644
--- a/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm
+++ b/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm
@@ -278,7 +278,11 @@ void XBMCClientWrapperImpl::populateEventMap(){
lr_map.insert(std::make_pair(ATV_BUTTON_RIGHT_H_RELEASE, new CPacketBUTTON(10, "JS0:AppleRemote", BTN_UP | BTN_QUEUE)));
lr_map.insert(std::make_pair(ATV_BUTTON_LEFT_H, new CPacketBUTTON(11, "JS0:AppleRemote", BTN_DOWN | BTN_QUEUE)));
lr_map.insert(std::make_pair(ATV_BUTTON_LEFT_H_RELEASE, new CPacketBUTTON(11, "JS0:AppleRemote", BTN_UP | BTN_QUEUE)));
-
+
+ //new aluminium remote buttons
+ lr_map.insert(std::make_pair(ATV_BUTTON_PLAY, new CPacketBUTTON(12, "JS0:AppleRemote", BTN_DOWN | BTN_NO_REPEAT | BTN_QUEUE)));
+ lr_map.insert(std::make_pair(ATV_BUTTON_PLAY_H, new CPacketBUTTON(13, "JS0:AppleRemote", BTN_DOWN | BTN_NO_REPEAT | BTN_QUEUE)));
+
// only present on atv >= 2.2
lr_map.insert(std::make_pair(ATV_BUTTON_CENTER_H, new CPacketBUTTON(7, "JS0:AppleRemote", BTN_DOWN | BTN_NO_REPEAT | BTN_QUEUE)));