Ticket #11546: cec_command_received.patch

File cec_command_received.patch, 1.5 KB (added by mythtv@…, 8 years ago)
  • mythtv/libs/libmythtv/mythsystemevent.cpp

    diff --git a/mythtv/libs/libmythtv/mythsystemevent.cpp b/mythtv/libs/libmythtv/mythsystemevent.cpp
    index 4256a55..a214392 100644
    a b void MythSystemEventHandler::SubstituteMatches(const QStringList &tokens, 
    129129        // Check for some token names that we substitute one for one as
    130130        // %MATCH% type variables.
    131131        if ((*it == "CARDID") ||
     132            (*it == "COMMAND") ||
    132133            (*it == "RECSTATUS") ||
    133134            (*it == "HOSTNAME") ||
    134135            (*it == "SECS") ||
    MythSystemEventEditor::MythSystemEventEditor(MythScreenStack *parent, 
    407408    m_settings["EventCmdKey08"]                = tr("Keystroke event #8");
    408409    m_settings["EventCmdKey09"]                = tr("Keystroke event #9");
    409410    m_settings["EventCmdKey10"]                = tr("Keystroke event #10");
     411    m_settings["EventCmdCecCommandReceived"]   = tr("CEC command received");
    410412    m_settings["EventCmdAll"]                  = tr("Any event");
    411413}
    412414
  • mythtv/libs/libmythui/cecadapter.cpp

    diff --git a/mythtv/libs/libmythui/cecadapter.cpp b/mythtv/libs/libmythui/cecadapter.cpp
    index 64020fd..1eb2dc7 100644
    a b class CECAdapterPriv 
    266266                default:
    267267                    break;
    268268            }
     269            gCoreContext->SendSystemEvent(QString("CEC_COMMAND_RECEIVED COMMAND %1")
     270                                          .arg(command.opcode));
    269271        }
    270272
    271273        LogMessages();