X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECClient.cpp;h=5b4529788487f19305da14379242bb5e4fcd82fd;hb=6b567d1fa9db2009bbeaf6d355bdd0438a4eeca0;hp=24f196f49287008800a01c1b88f76ff4d0463259;hpb=5f2f3609d7ee857ac7e5d03600fbd735e99c892f;p=deb_libcec.git diff --git a/src/lib/CECClient.cpp b/src/lib/CECClient.cpp index 24f196f..5b45297 100644 --- a/src/lib/CECClient.cpp +++ b/src/lib/CECClient.cpp @@ -678,21 +678,19 @@ uint8_t CCECClient::SendMuteAudio(void) bool CCECClient::SendKeypress(const cec_logical_address iDestination, const cec_user_control_code key, bool bWait /* = true */) { - CCECBusDevice *device = GetPrimaryDevice(); CCECBusDevice *dest = m_processor->GetDevice(iDestination); - return device && dest ? - device->TransmitKeypress(GetPrimaryLogicalAdddress(), key, bWait) : + return dest ? + dest->TransmitKeypress(GetPrimaryLogicalAdddress(), key, bWait) : false; } bool CCECClient::SendKeyRelease(const cec_logical_address iDestination, bool bWait /* = true */) { - CCECBusDevice *device = GetPrimaryDevice(); CCECBusDevice *dest = m_processor->GetDevice(iDestination); - return device && dest ? - device->TransmitKeyRelease(GetPrimaryLogicalAdddress(), bWait) : + return dest ? + dest->TransmitKeyRelease(GetPrimaryLogicalAdddress(), bWait) : false; }