X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FANCommandHandler.cpp;h=16831a974c4680bd897b24ac54708bc4121348dc;hb=a604c2182886d2ce8e8d930546b36289956e4b4f;hp=648f4a0de21501cefd521eedb94aed67a955a91c;hpb=b0a5e4fc9b66620b00f937f7e9a406bf22aaaf1d;p=deb_libcec.git diff --git a/src/lib/implementations/ANCommandHandler.cpp b/src/lib/implementations/ANCommandHandler.cpp index 648f4a0..16831a9 100644 --- a/src/lib/implementations/ANCommandHandler.cpp +++ b/src/lib/implementations/ANCommandHandler.cpp @@ -1,7 +1,7 @@ /* * This file is part of the libCEC(R) library. * - * libCEC(R) is Copyright (C) 2011-2012 Pulse-Eight Limited. All rights reserved. + * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved. * libCEC(R) is an original work, containing original code. * * libCEC(R) is a trademark of Pulse-Eight Limited. @@ -68,23 +68,9 @@ int CANCommandHandler::HandleVendorRemoteButtonDown(const cec_command &command) cec_keypress key; key.duration = CEC_BUTTON_TIMEOUT; - key.keycode = CEC_USER_CONTROL_CODE_UNKNOWN; + key.keycode = (cec_user_control_code)command.parameters[0]; - switch (command.parameters[0]) - { - case CEC_USER_CONTROL_CODE_AN_RETURN: - key.keycode = client && client->GetClientVersion() >= CEC_CLIENT_VERSION_1_5_0 ? - CEC_USER_CONTROL_CODE_AN_RETURN : - CEC_USER_CONTROL_CODE_EXIT; - break; - case CEC_USER_CONTROL_CODE_AN_CHANNELS_LIST: - key.keycode = CEC_USER_CONTROL_CODE_AN_CHANNELS_LIST; - break; - default: - break; - } - - if (key.keycode != CEC_USER_CONTROL_CODE_UNKNOWN && client) + if (client) client->AddKey(key); return COMMAND_HANDLED;