repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed: don't stick a value larger than 255 in a byte
[deb_libcec.git]
/
src
/
lib
/
CECClient.cpp
diff --git
a/src/lib/CECClient.cpp
b/src/lib/CECClient.cpp
index 85df46d376859c9c24575abb175b110202af7a90..12ca4ceb753c4bda0a2cf9c94969502372dd9d8c 100644
(file)
--- a/
src/lib/CECClient.cpp
+++ b/
src/lib/CECClient.cpp
@@
-995,7
+995,7
@@
void CCECClient::AddKey(bool bSendComboKey /* = false */)
void CCECClient::AddKey(const cec_keypress &key)
{
void CCECClient::AddKey(const cec_keypress &key)
{
- if (key.keycode > CEC_USER_CONTROL_CODE_MAX
&&
+ if (key.keycode > CEC_USER_CONTROL_CODE_MAX
||
key.keycode < CEC_USER_CONTROL_CODE_SELECT)
{
// send back the previous key if there is one
key.keycode < CEC_USER_CONTROL_CODE_SELECT)
{
// send back the previous key if there is one
@@
-1466,7
+1466,7
@@
void CCECClient::CallbackAddKey(const cec_keypress &key)
int64_t now = GetTimeMs();
if (m_lastKeypress.keycode != key.keycode ||
key.duration > 0 ||
int64_t now = GetTimeMs();
if (m_lastKeypress.keycode != key.keycode ||
key.duration > 0 ||
- now - m_iLastKeypressTime >= m_configuration.iDoubleTapTimeoutMs)
+ now - m_iLastKeypressTime >= m_configuration.iDoubleTapTimeoutMs
* DOUBLE_TAP_TIMEOUT_UNIT_SIZE
)
{
// no double tap
if (key.duration == 0)
{
// no double tap
if (key.duration == 0)