X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCEC.cpp;h=7c0f7927956126f088a9bb5ec443f9c04ebe086b;hb=cb9128746f5f12e284c3e2efe92a1a5e39ac453c;hp=78fca2d1a610c2528bfc7cd34096e0db9ea0fbfb;hpb=2492216a2285656be7a2b548eddd986fd8d6c2b3;p=deb_libcec.git diff --git a/src/lib/LibCEC.cpp b/src/lib/LibCEC.cpp index 78fca2d..7c0f792 100644 --- a/src/lib/LibCEC.cpp +++ b/src/lib/LibCEC.cpp @@ -193,6 +193,11 @@ bool CLibCEC::SetInactiveView(void) return m_cec ? m_cec->SetInactiveView() : false; } +bool CLibCEC::SetOSDString(cec_logical_address iLogicalAddress, cec_display_control duration, const char *strMessage) +{ + return m_cec ? m_cec->SetOSDString(iLogicalAddress, duration, strMessage) : false; +} + void CLibCEC::AddLog(cec_log_level level, const string &strMessage) { if (m_cec) @@ -246,6 +251,13 @@ void CLibCEC::SetCurrentButton(cec_user_control_code iButtonCode) { m_iCurrentButton = iButtonCode; m_buttontime = GetTimeMs(); + + /* push keypress to the keybuffer with 0 duration. + push another press to the keybuffer with the duration set when the button is released */ + cec_keypress key; + key.duration = 0; + key.keycode = m_iCurrentButton; + m_keyBuffer.Push(key); } void * CECCreate(const char *strDeviceName, CEC::cec_logical_address iLogicalAddress /*= CEC::CECDEVICE_PLAYBACKDEVICE1 */, uint16_t iPhysicalAddress /* = CEC_DEFAULT_PHYSICAL_ADDRESS */)