From 3cf3a86ea90fed1cdfeb1d31720677b14a1fc44b Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Fri, 14 Oct 2011 12:22:15 +0200 Subject: [PATCH] cec: log keypresses in the debug log --- src/lib/CECProcessor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 7ddf612..b579671 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -560,7 +560,13 @@ void CCECProcessor::ParseCommand(cec_command &command) m_controller->AddKey(); if (command.parameters[0] <= CEC_USER_CONTROL_CODE_MAX) + { + CStdString strLog; + strLog.Format("key pressed: %1x", command.parameters[0]); + m_controller->AddLog(CEC_LOG_DEBUG, strLog.c_str()); + m_controller->SetCurrentButton((cec_user_control_code) command.parameters[0]); + } } break; case CEC_OPCODE_USER_CONTROL_RELEASE: -- 2.34.1