diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-11-07 14:21:29 -0200 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-11-07 14:21:29 -0200 |
commit | 3355697187c200e0ca92d1190f2918824598b616 (patch) | |
tree | b8fe2756f21560a38aa3d563e66bc9ff7b56b11f /libre/xbmc/0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch | |
parent | 6cdc5117d20e6503b462803dc531281264c2581c (diff) |
xbmc-13.2-5.parabola1: add patches for libcec 2.2.0
Diffstat (limited to 'libre/xbmc/0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch')
-rw-r--r-- | libre/xbmc/0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/libre/xbmc/0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch b/libre/xbmc/0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch new file mode 100644 index 000000000..d4556ae29 --- /dev/null +++ b/libre/xbmc/0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch @@ -0,0 +1,112 @@ +From 6544830d1a0b9810c2feb2fcb34df3f90b010d2f Mon Sep 17 00:00:00 2001 +From: Lars Op den Kamp <lars@opdenkamp.eu> +Date: Mon, 27 Oct 2014 21:01:00 +0100 +Subject: [PATCH 4/8] [CEC] fixed: don't return garbage from CEC related app + messenger methods see + https://github.com/xbmc/xbmc/commit/19d37944ca2a2ac2f3e71a40a94e9ea289d8f2db#commitcomment-8248480 + +--- + xbmc/Application.cpp | 14 ++++++++------ + xbmc/ApplicationMessenger.cpp | 20 +++++--------------- + xbmc/ApplicationMessenger.h | 4 ++-- + 3 files changed, 15 insertions(+), 23 deletions(-) + +diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp +index d5604dc..4d26183 100644 +--- a/xbmc/Application.cpp ++++ b/xbmc/Application.cpp +@@ -2351,16 +2351,18 @@ + + if (StringUtils::StartsWithNoCase(action.GetName(),"CECToggleState") || StringUtils::StartsWithNoCase(action.GetName(),"CECStandby")) + { +- bool ret = true; +- +- CLog::Log(LOGDEBUG, "%s: action %s [%d], toggling state of playing device", __FUNCTION__, action.GetName().c_str(), action.GetID()); + // do not wake up the screensaver right after switching off the playing device + if (StringUtils::StartsWithNoCase(action.GetName(),"CECToggleState")) +- ret = CApplicationMessenger::Get().CECToggleState(); ++ { ++ CLog::Log(LOGDEBUG, "%s: action %s [%d], toggling state of playing device", __FUNCTION__, action.GetName().c_str(), action.GetID()); ++ if (!CApplicationMessenger::Get().CECToggleState()) ++ return true; ++ } + else +- ret = CApplicationMessenger::Get().CECStandby(); +- if (!ret) /* display is switched off */ ++ { ++ CApplicationMessenger::Get().CECStandby(); + return true; ++ } + } + + ResetScreenSaver(); +diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp +index 1a59c5c..d228273 100644 +--- a/xbmc/ApplicationMessenger.cpp ++++ b/xbmc/ApplicationMessenger.cpp +@@ -843,12 +843,12 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg) + } + case TMSG_CECACTIVATESOURCE: + { +- *((bool*)pMsg->lpVoid) = g_peripherals.ToggleDeviceState(STATE_ACTIVATE_SOURCE); ++ g_peripherals.ToggleDeviceState(STATE_ACTIVATE_SOURCE); + break; + } + case TMSG_CECSTANDBY: + { +- *((bool*)pMsg->lpVoid) = g_peripherals.ToggleDeviceState(STATE_STANDBY); ++ g_peripherals.ToggleDeviceState(STATE_STANDBY); + break; + } + case TMSG_START_ANDROID_ACTIVITY: +@@ -1396,29 +1396,19 @@ bool CApplicationMessenger::CECToggleState() + + ThreadMessage tMsg = {TMSG_CECTOGGLESTATE}; + tMsg.lpVoid = (void*)&result; +- SendMessage(tMsg, false); ++ SendMessage(tMsg, true); + + return result; + } + +-bool CApplicationMessenger::CECActivateSource() ++void CApplicationMessenger::CECActivateSource() + { +- bool result; +- + ThreadMessage tMsg = {TMSG_CECACTIVATESOURCE}; +- tMsg.lpVoid = (void*)&result; + SendMessage(tMsg, false); +- +- return result; + } + +-bool CApplicationMessenger::CECStandby() ++void CApplicationMessenger::CECStandby() + { +- bool result; +- + ThreadMessage tMsg = {TMSG_CECSTANDBY}; +- tMsg.lpVoid = (void*)&result; + SendMessage(tMsg, false); +- +- return result; + } +diff --git a/xbmc/ApplicationMessenger.h b/xbmc/ApplicationMessenger.h +index 9013567..543e065 100644 +--- a/xbmc/ApplicationMessenger.h ++++ b/xbmc/ApplicationMessenger.h +@@ -219,8 +219,8 @@ public: + + void LoadProfile(unsigned int idx); + bool CECToggleState(); +- bool CECActivateSource(); +- bool CECStandby(); ++ void CECActivateSource(); ++ void CECStandby(); + + CStdString GetResponse(); + int SetResponse(CStdString response); +-- +2.1.2 + |