X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FANCommandHandler.cpp;h=f8a8ade3c421aa12d00f781b03978eb1706dc9ba;hb=69a1a673f55d177a83f8c45f10c82787d6d763aa;hp=596bcf8e2b94e272eb762270d1615e3b83f0d2e6;hpb=b492c10e731625d7c000654de2372b54339f7c8d;p=deb_libcec.git diff --git a/src/lib/implementations/ANCommandHandler.cpp b/src/lib/implementations/ANCommandHandler.cpp index 596bcf8..f8a8ade 100644 --- a/src/lib/implementations/ANCommandHandler.cpp +++ b/src/lib/implementations/ANCommandHandler.cpp @@ -46,7 +46,7 @@ CANCommandHandler::CANCommandHandler(CCECBusDevice *busDevice) : bool CANCommandHandler::HandleVendorRemoteButtonDown(const cec_command &command) { - if (m_processor->IsStarted() && command.parameters.size > 0) + if (m_processor->IsRunning() && command.parameters.size > 0) { cec_keypress key; key.duration = CEC_BUTTON_TIMEOUT; @@ -54,8 +54,10 @@ bool CANCommandHandler::HandleVendorRemoteButtonDown(const cec_command &command) switch (command.parameters[0]) { - case CEC_AN_USER_CONTROL_CODE_RETURN: - key.keycode = CEC_USER_CONTROL_CODE_EXIT; + case CEC_USER_CONTROL_CODE_AN_RETURN: + key.keycode = m_processor->GetClientVersion() >= CEC_CLIENT_VERSION_1_5_0 ? + CEC_USER_CONTROL_CODE_AN_RETURN : + CEC_USER_CONTROL_CODE_EXIT; break; default: break;