fixed - new combo key handling broke samsung's vendor specific remote buttons. github...
[deb_libcec.git] / src / lib / implementations / ANCommandHandler.cpp
index 8eccf88457b57750571d1ef5c6789105ae216da7..92b4464b2fe82dd06325d0c8f723ec9e41b4b547 100644 (file)
  *     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;