diff options
-rw-r--r-- | language/Dutch/strings.xml | 1 | ||||
-rw-r--r-- | language/English/strings.xml | 1 | ||||
-rw-r--r-- | system/peripherals.xml | 1 | ||||
-rw-r--r-- | xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 17 |
4 files changed, 13 insertions, 7 deletions
diff --git a/language/Dutch/strings.xml b/language/Dutch/strings.xml index 745c5ee869..f7c53aa796 100644 --- a/language/Dutch/strings.xml +++ b/language/Dutch/strings.xml @@ -2353,4 +2353,5 @@ <string id="36015">HDMI poort nummer</string> <string id="36016">XBMC verbonden</string> <string id="36017">Adapter gevonden, maar libcec is niet beschikbaar</string> + <string id="36018">Gebruik de taalinstelling van de TV</string> </strings> diff --git a/language/English/strings.xml b/language/English/strings.xml index 9d01cfa441..9772efb691 100644 --- a/language/English/strings.xml +++ b/language/English/strings.xml @@ -2388,4 +2388,5 @@ <string id="36015">HDMI port number</string> <string id="36016">XBMC connected</string> <string id="36017">Adapter found, but libcec is not available</string> + <string id="36018">Use the TV's language setting</string> </strings> diff --git a/system/peripherals.xml b/system/peripherals.xml index f27def193e..2066a85c9a 100644 --- a/system/peripherals.xml +++ b/system/peripherals.xml @@ -26,5 +26,6 @@ <setting key="cec_mark_inactive_shutdown" type="bool" value="0" label="36010" /> <setting key="standby_pc_on_tv_standby" type="bool" value="1" label="36014" /> <setting key="cec_debug_logging" type="bool" value="0" label="20191" /> + <setting key="use_tv_menu_language" type="bool" value="1" label="36018" /> </peripheral> </peripherals> diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp index aa810c671c..6797f5cb38 100644 --- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp @@ -41,7 +41,7 @@ using namespace CEC; #define CEC_LIB_SUPPORTED_VERSION 1 -/* time in seconds to ignore standby commands from devices */ +/* time in seconds to ignore standby commands from devices after the screensaver has been activated */ #define SCREENSAVER_TIMEOUT 10 class DllLibCECInterface @@ -225,7 +225,7 @@ void CPeripheralCecAdapter::Process(void) if (strPort.empty()) return; - // set the correct physical address + // set correct physical address from peripheral settings int iHdmiPort = GetSettingInt("cec_hdmi_port"); if (iHdmiPort <= 0 || iHdmiPort > 16) iHdmiPort = 1; @@ -261,11 +261,14 @@ void CPeripheralCecAdapter::Process(void) m_cecAdapter->SetActiveView(); FlushLog(); - m_cecAdapter->SetOSDString(CECDEVICE_TV, CEC_DISPLAY_CONTROL_DISPLAY_FOR_DEFAULT_TIME, g_localizeStrings.Get(36016).c_str()); + if (GetSettingBool("use_tv_menu_language")) + { + cec_menu_language language; + if (m_cecAdapter->GetDeviceMenuLanguage(CECDEVICE_TV, &language)) + SetMenuLanguage(language.language); + } - cec_menu_language language; - if (m_cecAdapter->GetDeviceMenuLanguage(CECDEVICE_TV, &language)) - SetMenuLanguage(language.language); + m_cecAdapter->SetOSDString(CECDEVICE_TV, CEC_DISPLAY_CONTROL_DISPLAY_FOR_DEFAULT_TIME, g_localizeStrings.Get(36016).c_str()); while (!m_bStop) { @@ -427,7 +430,7 @@ void CPeripheralCecAdapter::ProcessNextCommand(void) } break; case CEC_OPCODE_SET_MENU_LANGUAGE: - if (command.initiator == CECDEVICE_TV && command.parameters.size == 3) + if (GetSettingBool("use_tv_menu_language") && command.initiator == CECDEVICE_TV && command.parameters.size == 3) { char strNewLanguage[4]; for (int iPtr = 0; iPtr < 3; iPtr++) |