X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FANCommandHandler.cpp;h=16831a974c4680bd897b24ac54708bc4121348dc;hb=bfea6e0a8ee4bc9e40c64ea68f22db69ac3cb26f;hp=8eccf88457b57750571d1ef5c6789105ae216da7;hpb=04283ce44fc45cbfb145075d02ff116e277f7560;p=deb_libcec.git diff --git a/src/lib/implementations/ANCommandHandler.cpp b/src/lib/implementations/ANCommandHandler.cpp index 8eccf88..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. @@ -30,11 +30,13 @@ * http://www.pulse-eight.net/ */ +#include "env.h" #include "ANCommandHandler.h" -#include "../devices/CECBusDevice.h" -#include "../CECProcessor.h" -#include "../LibCEC.h" -#include "../CECClient.h" + +#include "lib/devices/CECBusDevice.h" +#include "lib/CECProcessor.h" +#include "lib/LibCEC.h" +#include "lib/CECClient.h" using namespace CEC; @@ -66,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; - - 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; - } + key.keycode = (cec_user_control_code)command.parameters[0]; - if (key.keycode != CEC_USER_CONTROL_CODE_UNKNOWN && client) + if (client) client->AddKey(key); return COMMAND_HANDLED;