summaryrefslogtreecommitdiffstats
path: root/abs/extra/plex-home-theater/plex-libcec.patch
blob: 208756958014db4d4fa42aaf52a6651ccf0b2e1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
diff -rupN plex-home-theater-public-1.4.1.469-47a90f01.orig/system/peripherals.xml plex-home-theater-public-1.4.1.469-47a90f01/system/peripherals.xml
--- plex-home-theater-public-1.4.1.469-47a90f01.orig/system/peripherals.xml	2015-07-22 11:09:33.213307552 +0200
+++ plex-home-theater-public-1.4.1.469-47a90f01/system/peripherals.xml	2015-07-22 11:09:47.349594239 +0200
@@ -28,7 +28,7 @@
     <setting key="device_type" type="int" value="1" configurable="0" />
     <setting key="wake_devices_advanced" type="string" value="" configurable="0" />
     <setting key="standby_devices_advanced" type="string" value="" configurable="0" />
-    <setting key="double_tap_timeout_ms" type="int" min="0" value="2000" configurable="0" />
+    <setting key="double_tap_timeout_ms" type="int" min="0" value="300" configurable="0" />
   </peripheral>
 
   <peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
diff -rupN plex-home-theater-public-1.4.1.469-47a90f01.orig/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp plex-home-theater-public-1.4.1.469-47a90f01/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp
--- plex-home-theater-public-1.4.1.469-47a90f01.orig/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp	2015-07-22 11:09:32.826651274 +0200
+++ plex-home-theater-public-1.4.1.469-47a90f01/xbmc/peripherals/bus/virtual/PeripheralBusCEC.cpp	2015-07-22 11:09:47.349594239 +0200
@@ -101,6 +101,8 @@ bool CPeripheralBusCEC::PerformDeviceSca
       break;
     case ADAPTERTYPE_RPI:
       result.m_mappedBusType = PERIPHERAL_BUS_RPI;
+      // the Pi's adapter cannot be removed, no need to rescan
+      m_bNeedsPolling = false;
       break;
     default:
       break;
diff -rupN plex-home-theater-public-1.4.1.469-47a90f01.orig/xbmc/peripherals/devices/PeripheralCecAdapter.cpp plex-home-theater-public-1.4.1.469-47a90f01/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
--- plex-home-theater-public-1.4.1.469-47a90f01.orig/xbmc/peripherals/devices/PeripheralCecAdapter.cpp	2015-07-22 11:09:32.826651274 +0200
+++ plex-home-theater-public-1.4.1.469-47a90f01/xbmc/peripherals/devices/PeripheralCecAdapter.cpp	2015-07-22 11:13:05.310907421 +0200
@@ -282,7 +283,7 @@ bool CPeripheralCecAdapter::InitialiseFe
     }
     else
     {
-      CLog::Log(LOGDEBUG, "%s - using libCEC v%s", __FUNCTION__, m_cecAdapter->ToString((cec_server_version)m_configuration.serverVersion));
+      CLog::Log(LOGDEBUG, "%s - using libCEC v%s", __FUNCTION__, m_cecAdapter->ToString((cec_version)m_configuration.serverVersion));
       SetVersionInfo(m_configuration);
     }
 
@@ -295,7 +296,7 @@ bool CPeripheralCecAdapter::InitialiseFe
 
 void CPeripheralCecAdapter::SetVersionInfo(const libcec_configuration &configuration)
 {
-  m_strVersionInfo.Format("libCEC %s - firmware v%d", m_cecAdapter->ToString((cec_server_version)configuration.serverVersion), configuration.iFirmwareVersion);
+  m_strVersionInfo.Format("libCEC %s - firmware v%d", m_cecAdapter->ToString((cec_version)configuration.serverVersion), configuration.iFirmwareVersion);
 
   // append firmware build date
   if (configuration.iFirmwareBuildDate != CEC_FW_BUILD_UNKNOWN)
@@ -1303,7 +1304,7 @@ void CPeripheralCecAdapter::SetConfigura
 void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
 {
   // use the same client version as libCEC version
-  m_configuration.clientVersion = CEC_CLIENT_VERSION_CURRENT;
+  m_configuration.clientVersion = LIBCEC_VERSION_CURRENT;
 
   // device name 'XBMC'
   snprintf(m_configuration.strDeviceName, 13, "%s", GetSettingString("device_name").c_str());
@@ -1379,7 +1380,7 @@ void CPeripheralCecAdapter::SetConfigura
   m_configuration.bShutdownOnStandby = iStandbyAction == 13005 ? 1 : 0;
 
   // double tap prevention timeout in ms
-  m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
+  m_configuration.iDoubleTapTimeout50Ms = GetSettingInt("double_tap_timeout_ms") / 50;
 }
 
 void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, cec_logical_addresses &addresses)