diff --git a/packages/mediacenter/kodi/patches/kodi-200.01-add-settings-for-libcec-button-repeats.patch b/packages/mediacenter/kodi/patches/kodi-200.01-add-settings-for-libcec-button-repeats.patch new file mode 100644 index 0000000000..ef7ec5618e --- /dev/null +++ b/packages/mediacenter/kodi/patches/kodi-200.01-add-settings-for-libcec-button-repeats.patch @@ -0,0 +1,83 @@ +From 486c88dcd90bbbadb5fb5f69a697872adf12c43a Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 28 Oct 2014 00:19:40 +0000 +Subject: [PATCH] [cec] Add settings for configuring button repeats + +--- + addons/resource.language.en_gb/resources/strings.po | 15 +++++++++++++++ + system/peripherals.xml | 4 +++- + xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 16 ++++++++++++++++ + 3 files changed, 34 insertions(+), 1 deletion(-) + +diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po +index bedbd87..6db61ed 100644 +--- a/addons/resource.language.en_gb/resources/strings.po ++++ b/addons/resource.language.en_gb/resources/strings.po +@@ -16687,3 +16687,18 @@ msgstr "" + msgctxt "#38009" + msgid "%i dB" + msgstr "" ++ ++#: system/peripherals.xml ++msgctxt "#38050" ++msgid "Remote button press delay before repeating (ms)" ++msgstr "" ++ ++#: system/peripherals.xml ++msgctxt "#38051" ++msgid "Remote button press repeat rate (ms)" ++msgstr "" ++ ++#: system/peripherals.xml ++msgctxt "#38052" ++msgid "Remote button press release time (ms)" ++msgstr "" +diff --git a/system/peripherals.xml b/system/peripherals.xml +index a67dc2f..6841bda 100644 +--- a/system/peripherals.xml ++++ b/system/peripherals.xml +@@ -30,7 +30,9 @@ + + + +- ++ ++ ++ + + + +diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +index ea702e5..b5ff693 100644 +--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp ++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +@@ -1267,6 +1267,20 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu + m_configuration.bSendInactiveSource = config.bSendInactiveSource; + bChanged |= SetSetting("send_inactive_source", m_configuration.bSendInactiveSource == 1); + ++#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD) ++ m_configuration.iDoubleTapTimeout50Ms = config.iDoubleTapTimeout50Ms; ++ bChanged |= SetSetting("double_tap_timeout_ms", (int)m_configuration.iDoubleTapTimeout50Ms * 50); ++#else ++ m_configuration.iDoubleTapTimeoutMs = config.iDoubleTapTimeoutMs; ++ bChanged |= SetSetting("double_tap_timeout_ms", (int)m_configuration.iDoubleTapTimeoutMs; ++#endif ++ ++ m_configuration.iButtonRepeatRateMs = config.iButtonRepeatRateMs; ++ bChanged |= SetSetting("button_repeat_rate_ms", (int)m_configuration.iButtonRepeatRateMs); ++ ++ m_configuration.iButtonReleaseDelayMs = config.iButtonReleaseDelayMs; ++ bChanged |= SetSetting("button_release_delay_ms", (int)m_configuration.iButtonReleaseDelayMs); ++ + m_configuration.iFirmwareVersion = config.iFirmwareVersion; + m_configuration.bShutdownOnStandby = config.bShutdownOnStandby; + +@@ -1371,6 +1385,8 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void) + // backwards compatibility. will be removed once the next major release of libCEC is out + m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms"); + #endif ++ m_configuration.iButtonRepeatRateMs = GetSettingInt("button_repeat_rate_ms"); ++ m_configuration.iButtonReleaseDelayMs = GetSettingInt("button_release_delay_ms"); + } + + void CPeripheralCecAdapter::ReadLogicalAddresses(const std::string &strString, cec_logical_addresses &addresses)