Permalink
Browse files

Skip double press removal. It is handled through other means.

  • Loading branch information...
popcornmix committed Oct 28, 2014
1 parent 7a3362a commit ef8bc8e1ffede6fc7c95c7ccf1459f1ca4df0d2c
Showing with 1 addition and 19 deletions.
  1. +1 −17 src/libcec/CECClient.cpp
  2. +0 −2 src/libcec/CECClient.h
View
@@ -60,11 +60,8 @@ CCECClient::CCECClient(CCECProcessor *processor, const libcec_configuration &con
m_releaseButtontime(0),
m_pressedButtoncount(0),
m_releasedButtoncount(0),
m_iPreventForwardingPowerOffCommand(0),
m_iLastKeypressTime(0)
m_iPreventForwardingPowerOffCommand(0)
{
m_lastKeypress.keycode = CEC_USER_CONTROL_CODE_UNKNOWN;
m_lastKeypress.duration = 0;
m_configuration.Clear();
// set the initial configuration
SetConfiguration(configuration);
@@ -1652,20 +1649,7 @@ void CCECClient::CallbackAddKey(const cec_keypress &key)
{
CLockObject lock(m_cbMutex);
if (m_configuration.callbacks && m_configuration.callbacks->CBCecKeyPress)
{
// prevent double taps
int64_t now = GetTimeMs();
if (m_lastKeypress.keycode != key.keycode ||
key.duration > 0 ||
now - m_iLastKeypressTime >= DoubleTapTimeoutMS())
{
// no double tap
if (key.duration == 0)
m_iLastKeypressTime = now;
m_lastKeypress = key;
m_configuration.callbacks->CBCecKeyPress(m_configuration.callbackParam, key);
}
}
}
void CCECClient::CallbackAddLog(const cec_log_message &message)
View
@@ -450,8 +450,6 @@ namespace CEC
int32_t m_pressedButtoncount; /**< the number of times a button released message has been seen for this press. */
int32_t m_releasedButtoncount; /**< the number of times a button pressed message has been seen for this press. */
int64_t m_iPreventForwardingPowerOffCommand; /**< prevent forwarding standby commands until this time */
int64_t m_iLastKeypressTime; /**< last time a key press was sent to the client */
cec_keypress m_lastKeypress; /**< the last key press that was sent to the client */
PLATFORM::SyncedBuffer<CCallbackWrap*> m_callbackCalls;
};
}

2 comments on commit ef8bc8e

@exzemat

This comment has been minimized.

exzemat replied Jul 18, 2017

Hello,
This commit seems to create some imput repeat with IR-remote:
#326

@satmandu

This comment has been minimized.

satmandu replied Mar 2, 2018

Reverting this commit definitely fixes very slow scrolling on my Panasonic TV. Any chance of getting this reverted in the default builds?

Please sign in to comment.