From 7fe6a9d88002fc9df6173c728102f79b45d3e561 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Thu, 17 May 2012 12:56:08 +0200 Subject: [PATCH] cec: fixed - correct initiator for keypresses --- src/lib/CECClient.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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; } -- 2.34.1