summaryrefslogtreecommitdiff
path: root/i18n.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-09-10 10:20:48 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-09-10 10:20:48 +0200
commitdefe0831f999e235eefd40edee78efaf3641a924 (patch)
treeaa9e6694846ba822908aabde8460fdde7829e90e /i18n.c
parent7673d5124a00988b5b72c9b4a9e97c9df63454c2 (diff)
downloadvdr-defe0831f999e235eefd40edee78efaf3641a924.tar.gz
vdr-defe0831f999e235eefd40edee78efaf3641a924.tar.bz2
Fixed selecting preferred audio for multi audio channels (cont'd)
Diffstat (limited to 'i18n.c')
-rw-r--r--i18n.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/i18n.c b/i18n.c
index 9569fd37..701a8fc9 100644
--- a/i18n.c
+++ b/i18n.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: i18n.c 1.207 2005/09/09 15:14:16 kls Exp $
+ * $Id: i18n.c 1.208 2005/09/10 10:20:48 kls Exp $
*
* Translations provided by:
*
@@ -5539,6 +5539,7 @@ const char *I18nNormalizeLanguageCode(const char *Code)
bool I18nIsPreferredLanguage(int *PreferredLanguages, const char *LanguageCode, int &OldPreference, int *Position)
{
int pos = 1;
+ bool found = false;
while (LanguageCode) {
int LanguageIndex = I18nLanguageIndex(LanguageCode);
for (int i = 0; i < I18nNumLanguages; i++) {
@@ -5549,6 +5550,7 @@ bool I18nIsPreferredLanguage(int *PreferredLanguages, const char *LanguageCode,
OldPreference = i;
if (Position)
*Position = pos;
+ found = true;
break;
}
}
@@ -5564,5 +5566,5 @@ bool I18nIsPreferredLanguage(int *PreferredLanguages, const char *LanguageCode,
OldPreference = I18nNumLanguages; // higher than the maximum possible value
return true; // if we don't find a preferred one, we take the first one
}
- return OldPreference >= 0;
+ return found;
}