From: Lars Op den Kamp Date: Thu, 21 Jun 2012 09:25:58 +0000 (+0200) Subject: cec: reset m_bPowerUpEventReceived in CVLCommandHandler when the device lets us know... X-Git-Tag: upstream/2.2.0~1^2~22^2^2~28 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=f8a669d0ed1464d6907636d9bdcabbb9475952cd 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 --- 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);