diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-09-10 10:20:48 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-09-10 10:20:48 +0200 |
commit | defe0831f999e235eefd40edee78efaf3641a924 (patch) | |
tree | aa9e6694846ba822908aabde8460fdde7829e90e /i18n.c | |
parent | 7673d5124a00988b5b72c9b4a9e97c9df63454c2 (diff) | |
download | vdr-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; } |