Skip to content

Commit ef8bc8e

Browse files
committed
Skip double press removal. It is handled through other means.
1 parent 7a3362a commit ef8bc8e

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

src/libcec/CECClient.cpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,8 @@ CCECClient::CCECClient(CCECProcessor *processor, const libcec_configuration &con
6060
m_releaseButtontime(0),
6161
m_pressedButtoncount(0),
6262
m_releasedButtoncount(0),
63-
m_iPreventForwardingPowerOffCommand(0),
64-
m_iLastKeypressTime(0)
63+
m_iPreventForwardingPowerOffCommand(0)
6564
{
66-
m_lastKeypress.keycode = CEC_USER_CONTROL_CODE_UNKNOWN;
67-
m_lastKeypress.duration = 0;
6865
m_configuration.Clear();
6966
// set the initial configuration
7067
SetConfiguration(configuration);
@@ -1652,20 +1649,7 @@ void CCECClient::CallbackAddKey(const cec_keypress &key)
16521649
{
16531650
CLockObject lock(m_cbMutex);
16541651
if (m_configuration.callbacks && m_configuration.callbacks->CBCecKeyPress)
1655-
{
1656-
// prevent double taps
1657-
int64_t now = GetTimeMs();
1658-
if (m_lastKeypress.keycode != key.keycode ||
1659-
key.duration > 0 ||
1660-
now - m_iLastKeypressTime >= DoubleTapTimeoutMS())
1661-
{
1662-
// no double tap
1663-
if (key.duration == 0)
1664-
m_iLastKeypressTime = now;
1665-
m_lastKeypress = key;
16661652
m_configuration.callbacks->CBCecKeyPress(m_configuration.callbackParam, key);
1667-
}
1668-
}
16691653
}
16701654

16711655
void CCECClient::CallbackAddLog(const cec_log_message &message)

src/libcec/CECClient.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,6 @@ namespace CEC
450450
int32_t m_pressedButtoncount; /**< the number of times a button released message has been seen for this press. */
451451
int32_t m_releasedButtoncount; /**< the number of times a button pressed message has been seen for this press. */
452452
int64_t m_iPreventForwardingPowerOffCommand; /**< prevent forwarding standby commands until this time */
453-
int64_t m_iLastKeypressTime; /**< last time a key press was sent to the client */
454-
cec_keypress m_lastKeypress; /**< the last key press that was sent to the client */
455453
PLATFORM::SyncedBuffer<CCallbackWrap*> m_callbackCalls;
456454
};
457455
}

0 commit comments

Comments
 (0)