View | Details | Raw Unified | Return to bug 196299 | Differences between
and this patch

Collapse All | Expand All

(-)multimedia/plexhometheater/files/patch-libcec22.patch (+50 lines)
Line 0 Link Here
1
--- system/peripherals.xml.orig	2014-08-25 20:29:00.000000000 +0800
2
+++ system/peripherals.xml	2014-12-31 07:15:34.972922137 +0800
3
@@ -28,7 +28,7 @@
4
     <setting key="device_type" type="int" value="1" configurable="0" />
5
     <setting key="wake_devices_advanced" type="string" value="" configurable="0" />
6
     <setting key="standby_devices_advanced" type="string" value="" configurable="0" />
7
-    <setting key="double_tap_timeout_ms" type="int" min="0" value="2000" configurable="0" />
8
+    <setting key="double_tap_timeout_ms" type="int" min="0" value="300" configurable="0" />
9
   </peripheral>
10
 
11
   <peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
12
--- xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp.orig	2014-08-25 20:29:00.000000000 +0800
13
+++ xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp	2014-12-31 07:15:34.976923956 +0800
14
@@ -101,6 +101,8 @@
15
       break;
16
     case ADAPTERTYPE_RPI:
17
       result.m_mappedBusType = PERIPHERAL_BUS_RPI;
18
+      // the Pi's adapter cannot be removed, no need to rescan
19
+      m_bNeedsPolling = false;
20
       break;
21
     default:
22
       break;
23
--- xbmc/peripherals/devices/PeripheralCecAdapter.cpp.orig	2014-08-25 20:29:00.000000000 +0800
24
+++ xbmc/peripherals/devices/PeripheralCecAdapter.cpp	2014-12-31 07:15:34.986923118 +0800
25
@@ -1302,8 +1302,8 @@
26
 
27
 void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
28
 {
29
-  // use the same client version as libCEC version
30
-  m_configuration.clientVersion = CEC_CLIENT_VERSION_CURRENT;
31
+  // client version matches the version of libCEC that we originally used the API from
32
+  m_configuration.clientVersion = CEC_CLIENT_VERSION_2_2_0;
33
 
34
   // device name 'XBMC'
35
   snprintf(m_configuration.strDeviceName, 13, "%s", GetSettingString("device_name").c_str());
36
@@ -1378,8 +1378,13 @@
37
   m_configuration.bPowerOffOnStandby = iStandbyAction == 13011 ? 1 : 0;
38
   m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
39
 
40
-  // double tap prevention timeout in ms
41
+#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
42
+  // double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
43
+  m_configuration.iDoubleTapTimeout50Ms = GetSettingInt("double_tap_timeout_ms") / 50;
44
+#else
45
+  // backwards compatibility. will be removed once the next major release of libCEC is out
46
   m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
47
+#endif
48
 }
49
 
50
 void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)

Return to bug 196299