From: Matus Kral Date: Mon, 26 May 2014 18:59:17 +0000 (+0200) Subject: probably ugly hack to help with some X-Git-Tag: upstream/2.2.0~1^2~1^2~3^2~11^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=0ba92c2d4fb9088e52c9a0d80169fd86d48156b8;p=deb_libcec.git probably ugly hack to help with some newer Samsung TVs and activating source --- diff --git a/src/lib/implementations/ANCommandHandler.cpp b/src/lib/implementations/ANCommandHandler.cpp index 7e0e9b9..93e8c92 100644 --- a/src/lib/implementations/ANCommandHandler.cpp +++ b/src/lib/implementations/ANCommandHandler.cpp @@ -116,3 +116,13 @@ int CANCommandHandler::HandleDeviceVendorCommandWithId(const cec_command &comman } return CEC_ABORT_REASON_INVALID_OPERAND; } + +int CANCommandHandler::HandleSetMenuLanguage(const cec_command &command) +{ + if (m_processor->CECInitialised() && command.initiator == CECDEVICE_TV && command.destination == CECDEVICE_BROADCAST) + { + m_processor->GetDevice(command.initiator)->SetPowerStatus(CEC_POWER_STATUS_ON); + } + + return CCECCommandHandler::HandleSetMenuLanguage(command); +} diff --git a/src/lib/implementations/ANCommandHandler.h b/src/lib/implementations/ANCommandHandler.h index 595170a..73d3cae 100644 --- a/src/lib/implementations/ANCommandHandler.h +++ b/src/lib/implementations/ANCommandHandler.h @@ -47,6 +47,7 @@ namespace CEC int HandleVendorRemoteButtonDown(const cec_command &command); int HandleDeviceVendorCommandWithId(const cec_command &command); + int HandleSetMenuLanguage(const cec_command &command); protected: bool PowerOn(const cec_logical_address iInitiator, const cec_logical_address iDestination);