}
break;
case VC_CEC_BUTTON_PRESSED:
+ case VC_CEC_REMOTE_PRESSED:
{
// translate into a cec_command
cec_command command;
- cec_command::Format(command, (cec_logical_address)CEC_CB_INITIATOR(p0), (cec_logical_address)CEC_CB_FOLLOWER(p0), CEC_OPCODE_USER_CONTROL_PRESSED);
+ cec_command::Format(command,
+ (cec_logical_address)CEC_CB_INITIATOR(p0),
+ (cec_logical_address)CEC_CB_FOLLOWER(p0),
+ reason == VC_CEC_BUTTON_PRESSED ? CEC_OPCODE_USER_CONTROL_PRESSED : CEC_OPCODE_VENDOR_REMOTE_BUTTON_DOWN);
command.parameters.PushBack((uint8_t)CEC_CB_OPERAND1(p0));
// send to libCEC
}
break;
case VC_CEC_BUTTON_RELEASE:
+ case VC_CEC_REMOTE_RELEASE:
{
// translate into a cec_command
cec_command command;
- cec_command::Format(command, (cec_logical_address)CEC_CB_INITIATOR(p0), (cec_logical_address)CEC_CB_FOLLOWER(p0), CEC_OPCODE_USER_CONTROL_RELEASE);
+ cec_command::Format(command,
+ (cec_logical_address)CEC_CB_INITIATOR(p0),
+ (cec_logical_address)CEC_CB_FOLLOWER(p0),
+ reason == VC_CEC_BUTTON_PRESSED ? CEC_OPCODE_USER_CONTROL_RELEASE : CEC_OPCODE_VENDOR_REMOTE_BUTTON_UP);
command.parameters.PushBack((uint8_t)CEC_CB_OPERAND1(p0));
// send to libCEC
}
break;
case VC_CEC_TOPOLOGY:
- case VC_CEC_REMOTE_PRESSED:
- case VC_CEC_REMOTE_RELEASE:
break;
default:
LIB_CEC->AddLog(CEC_LOG_DEBUG, "ignoring unknown reason %x", reason);