repositories
/
deb_libcec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ff11274
)
press & hold
author
Lars Op den Kamp
<lars@opdenkamp.eu>
Mon, 3 Dec 2012 23:48:22 +0000
(
00:48
+0100)
committer
Lars Op den Kamp
<lars@opdenkamp.eu>
Mon, 3 Dec 2012 23:52:27 +0000
(
00:52
+0100)
src/lib/CECClient.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/CECClient.cpp
b/src/lib/CECClient.cpp
index 9d814cd35868409222f1f0457b0441a941388434..2e0045ced209f8f856406b990458d93840069d1d 100644
(file)
--- a/
src/lib/CECClient.cpp
+++ b/
src/lib/CECClient.cpp
@@
-937,12
+937,13
@@
void CCECClient::AddKey(bool bSendComboKey /* = false */)
void CCECClient::AddKey(const cec_keypress &key)
{
void CCECClient::AddKey(const cec_keypress &key)
{
- // send back the previous key if there is one
- AddKey();
-
if (key.keycode > CEC_USER_CONTROL_CODE_MAX &&
key.keycode < CEC_USER_CONTROL_CODE_SELECT)
if (key.keycode > CEC_USER_CONTROL_CODE_MAX &&
key.keycode < CEC_USER_CONTROL_CODE_SELECT)
+ {
+ // send back the previous key if there is one
+ AddKey();
return;
return;
+ }
cec_keypress transmitKey(key);
cec_keypress transmitKey(key);
@@
-964,10
+965,18
@@
void CCECClient::AddKey(const cec_keypress &key)
AddKey(true);
}
AddKey(true);
}
- if (
key.duration == 0
)
+ if (
m_iCurrentButton == key.keycode
)
{
{
- m_iCurrentButton = transmitKey.keycode;
- m_buttontime = m_iCurrentButton == CEC_USER_CONTROL_CODE_UNKNOWN || key.duration > 0 ? 0 : GetTimeMs();
+ m_buttontime = GetTimeMs();
+ }
+ else
+ {
+ AddKey();
+ if (key.duration == 0)
+ {
+ m_iCurrentButton = transmitKey.keycode;
+ m_buttontime = m_iCurrentButton == CEC_USER_CONTROL_CODE_UNKNOWN || key.duration > 0 ? 0 : GetTimeMs();
+ }
}
}
}
}