repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eafd9be
)
cec: don't hack around the issue that samsung's vendor specific keypresses aren't...
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Thu, 3 Nov 2011 19:35:36 +0000
(20:35 +0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Thu, 3 Nov 2011 19:35:39 +0000
(20:35 +0100)
src/lib/CECProcessor.cpp
patch
|
blob
|
blame
|
history
src/lib/CECProcessor.h
patch
|
blob
|
blame
|
history
src/lib/LibCEC.cpp
patch
|
blob
|
blame
|
history
src/lib/LibCEC.h
patch
|
blob
|
blame
|
history
src/lib/implementations/ANCommandHandler.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/CECProcessor.cpp
b/src/lib/CECProcessor.cpp
index c83bdc05486d158140313c5a602840f2e0188478..f781b6fb58b94f99f970a8eb2248937f958aa1cc 100644
(file)
--- a/
src/lib/CECProcessor.cpp
+++ b/
src/lib/CECProcessor.cpp
@@
-394,6
+394,11
@@
void CCECProcessor::AddCommand(const cec_command &command)
m_controller->AddCommand(command);
}
m_controller->AddCommand(command);
}
+void CCECProcessor::AddKey(cec_keypress &key)
+{
+ m_controller->AddKey(key);
+}
+
void CCECProcessor::AddKey(void)
{
m_controller->AddKey();
void CCECProcessor::AddKey(void)
{
m_controller->AddKey();
diff --git
a/src/lib/CECProcessor.h
b/src/lib/CECProcessor.h
index 895445ff14ee0e1aa3056ea17f5dc793a25a2359..d865167e114ff6e9332682a665c8873e31e30c9d 100644
(file)
--- a/
src/lib/CECProcessor.h
+++ b/
src/lib/CECProcessor.h
@@
-75,6
+75,7
@@
namespace CEC
virtual void SetCurrentButton(cec_user_control_code iButtonCode);
virtual void AddCommand(const cec_command &command);
virtual void SetCurrentButton(cec_user_control_code iButtonCode);
virtual void AddCommand(const cec_command &command);
+ virtual void AddKey(cec_keypress &key);
virtual void AddKey(void);
virtual void AddLog(cec_log_level level, const CStdString &strMessage);
virtual void AddKey(void);
virtual void AddLog(cec_log_level level, const CStdString &strMessage);
diff --git
a/src/lib/LibCEC.cpp
b/src/lib/LibCEC.cpp
index 0efef00b2bb1ea4ef30b67845b0d7c8e7b9f5596..95e2a2e42e72d1a5cadb37f2be924c207a19a322 100644
(file)
--- a/
src/lib/LibCEC.cpp
+++ b/
src/lib/LibCEC.cpp
@@
-227,6
+227,13
@@
void CLibCEC::AddLog(cec_log_level level, const string &strMessage)
}
}
}
}
+void CLibCEC::AddKey(cec_keypress &key)
+{
+ m_keyBuffer.Push(key);
+ m_iCurrentButton = CEC_USER_CONTROL_CODE_UNKNOWN;
+ m_buttontime = 0;
+}
+
void CLibCEC::AddKey(void)
{
if (m_iCurrentButton != CEC_USER_CONTROL_CODE_UNKNOWN)
void CLibCEC::AddKey(void)
{
if (m_iCurrentButton != CEC_USER_CONTROL_CODE_UNKNOWN)
diff --git
a/src/lib/LibCEC.h
b/src/lib/LibCEC.h
index 203facb43c15c9ec73a19c41a037160e606a9ce4..1997039f375e3d26e092b7bf7bd4bb0881c532dc 100644
(file)
--- a/
src/lib/LibCEC.h
+++ b/
src/lib/LibCEC.h
@@
-82,6
+82,7
@@
namespace CEC
virtual void AddLog(cec_log_level level, const std::string &strMessage);
virtual void AddKey(void);
virtual void AddLog(cec_log_level level, const std::string &strMessage);
virtual void AddKey(void);
+ virtual void AddKey(cec_keypress &key);
virtual void AddCommand(const cec_command &command);
virtual void CheckKeypressTimeout(void);
virtual void SetCurrentButton(cec_user_control_code iButtonCode);
virtual void AddCommand(const cec_command &command);
virtual void CheckKeypressTimeout(void);
virtual void SetCurrentButton(cec_user_control_code iButtonCode);
diff --git
a/src/lib/implementations/ANCommandHandler.cpp
b/src/lib/implementations/ANCommandHandler.cpp
index ef972f8a5408c9f9c357403c0c5810324ee1029d..f1e3dd5b1c2da7b7ec7fe50bb96e80ebeaf97cdd 100644
(file)
--- a/
src/lib/implementations/ANCommandHandler.cpp
+++ b/
src/lib/implementations/ANCommandHandler.cpp
@@
-46,28
+46,26
@@
bool CANCommandHandler::HandleVendorRemoteButtonDown(const cec_command &command)
{
if (command.parameters.size > 0)
{
{
if (command.parameters.size > 0)
{
- m_busDevice->GetProcessor()->AddKey();
+ cec_keypress key;
+ key.duration = CEC_BUTTON_TIMEOUT;
+ key.keycode = CEC_USER_CONTROL_CODE_UNKNOWN;
- uint8_t iButton = 0;
switch (command.parameters[0])
{
case CEC_AN_USER_CONTROL_CODE_RETURN:
switch (command.parameters[0])
{
case CEC_AN_USER_CONTROL_CODE_RETURN:
-
iButton = CEC_USER_CONTROL_CODE_PREVIOUS_CHANNEL
;
+
key.keycode = CEC_USER_CONTROL_CODE_EXIT
;
break;
default:
break;
}
break;
default:
break;
}
- if (
iButton > 0 && iButton <= CEC_USER_CONTROL_CODE_MAX
)
+ if (
key.keycode != CEC_USER_CONTROL_CODE_UNKNOWN
)
{
CStdString strLog;
{
CStdString strLog;
- strLog.Format("key pressed: %1x",
iButton
);
+ strLog.Format("key pressed: %1x",
key.keycode
);
m_busDevice->AddLog(CEC_LOG_DEBUG, strLog);
m_busDevice->AddLog(CEC_LOG_DEBUG, strLog);
- m_busDevice->GetProcessor()->SetCurrentButton((cec_user_control_code) command.parameters[0]);
-
- // these ones don't send key release events
- m_busDevice->GetProcessor()->AddKey();
+ m_busDevice->GetProcessor()->AddKey(key);
}
}
}
}