From 5abb18f38e146cebabd9ec1b7538459f41249a58 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Sun, 12 Feb 2012 20:10:10 +0100 Subject: [PATCH] cec: vendor command 05 -> TransmitVendorCommandSetDeviceMode --- src/lib/implementations/SLCommandHandler.cpp | 10 +++++----- src/lib/implementations/SLCommandHandler.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/implementations/SLCommandHandler.cpp b/src/lib/implementations/SLCommandHandler.cpp index 7c2623f..1d4c8c5 100644 --- a/src/lib/implementations/SLCommandHandler.cpp +++ b/src/lib/implementations/SLCommandHandler.cpp @@ -45,7 +45,7 @@ using namespace CEC; #define SL_COMMAND_REQUEST_POWER_STATUS 0xa0 #define SL_COMMAND_POWER_ON 0x03 #define SL_COMMAND_CONNECT_REQUEST 0x04 -#define SL_COMMAND_CONNECT_ACCEPT 0x05 +#define SL_COMMAND_SET_DEVICE_MODE 0x05 CSLCommandHandler::CSLCommandHandler(CCECBusDevice *busDevice) : CCECCommandHandler(busDevice), @@ -211,17 +211,17 @@ void CSLCommandHandler::HandleVendorCommandPowerOnStatus(const cec_command &comm void CSLCommandHandler::HandleVendorCommandSLConnect(const cec_command &command) { m_bSLEnabled = true; - TransmitVendorCommand05(m_processor->GetLogicalAddress(), command.initiator); + TransmitVendorCommandSetDeviceMode(m_processor->GetLogicalAddress(), command.initiator, CEC_DEVICE_TYPE_RECORDING_DEVICE); ActivateSource(); } -void CSLCommandHandler::TransmitVendorCommand05(const cec_logical_address iSource, const cec_logical_address iDestination) +void CSLCommandHandler::TransmitVendorCommandSetDeviceMode(const cec_logical_address iSource, const cec_logical_address iDestination, const cec_device_type type) { cec_command response; cec_command::Format(response, iSource, iDestination, CEC_OPCODE_VENDOR_COMMAND); - response.PushBack(SL_COMMAND_CONNECT_ACCEPT); - response.PushBack((uint8_t)m_processor->m_busDevices[iSource]->GetType()); + response.PushBack(SL_COMMAND_SET_DEVICE_MODE); + response.PushBack((uint8_t)type); Transmit(response, false); } diff --git a/src/lib/implementations/SLCommandHandler.h b/src/lib/implementations/SLCommandHandler.h index e80219b..e24dac7 100644 --- a/src/lib/implementations/SLCommandHandler.h +++ b/src/lib/implementations/SLCommandHandler.h @@ -57,7 +57,7 @@ namespace CEC virtual void HandleVendorCommandPowerOnStatus(const cec_command &command); virtual void HandleVendorCommandSLConnect(const cec_command &command); - virtual void TransmitVendorCommand05(const cec_logical_address iSource, const cec_logical_address iDestination); + virtual void TransmitVendorCommandSetDeviceMode(const cec_logical_address iSource, const cec_logical_address iDestination, const cec_device_type type); virtual bool HandleGiveDevicePowerStatus(const cec_command &command); virtual bool HandleGiveDeckStatus(const cec_command &command); -- 2.34.1