From f8a669d0ed1464d6907636d9bdcabbb9475952cd Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Thu, 21 Jun 2012 11:25:58 +0200 Subject: [PATCH] cec: reset m_bPowerUpEventReceived in CVLCommandHandler when the device lets us know it went into standby mode. fixes possibly failed active source switches after it succeeded once --- src/lib/implementations/VLCommandHandler.cpp | 10 ++++++++++ src/lib/implementations/VLCommandHandler.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/lib/implementations/VLCommandHandler.cpp b/src/lib/implementations/VLCommandHandler.cpp index 642b383..74b2650 100644 --- a/src/lib/implementations/VLCommandHandler.cpp +++ b/src/lib/implementations/VLCommandHandler.cpp @@ -164,6 +164,16 @@ bool CVLCommandHandler::PowerUpEventReceived(void) return m_bPowerUpEventReceived; } +int CVLCommandHandler::HandleStandby(const cec_command &command) +{ + { + CLockObject lock(m_mutex); + m_bPowerUpEventReceived = false; + } + + return CCECCommandHandler::HandleStandby(command); +} + int CVLCommandHandler::HandleVendorCommand(const cec_command &command) { // some vendor command voodoo that will enable more buttons on the remote diff --git a/src/lib/implementations/VLCommandHandler.h b/src/lib/implementations/VLCommandHandler.h index 8b26741..699ef40 100644 --- a/src/lib/implementations/VLCommandHandler.h +++ b/src/lib/implementations/VLCommandHandler.h @@ -44,6 +44,7 @@ namespace CEC bool InitHandler(void); int HandleDeviceVendorCommandWithId(const cec_command &command); + int HandleStandby(const cec_command &command); bool TransmitActiveSource(const cec_logical_address iInitiator, uint16_t iPhysicalAddress); bool TransmitPendingActiveSourceCommands(void); -- 2.34.1