diff options
author | rubidium <rubidium@openttd.org> | 2007-06-17 15:48:57 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-06-17 15:48:57 +0000 |
commit | 347c28b71ac754aee20f8eeeae1df1a3b9a49d10 (patch) | |
tree | 8bc2a050b44170ed785af66e6e9045d429c789db /src/strings.cpp | |
parent | 5fdde681c2aff0976eef8cea59422332527b3a65 (diff) | |
download | openttd-347c28b71ac754aee20f8eeeae1df1a3b9a49d10.tar.xz |
(svn r10182) -Codechange: rewrite most part of the file loading/searching to be more flexible.
-Codechange: add support for personal directories on Windows.
-Fix [FS#153, FS#193, FS#502, FS#816, FS#854]: fix issues related to fixed names, fixed places of files/directories and application bundles.
Diffstat (limited to 'src/strings.cpp')
-rw-r--r-- | src/strings.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/strings.cpp b/src/strings.cpp index 603371029..f434bf90f 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -23,6 +23,7 @@ #include "music.h" #include "date.h" #include "industry.h" +#include "fileio.h" #include "helpers.hpp" #include "cargotype.h" #include "group.h" @@ -1295,8 +1296,15 @@ static int GetLanguageList(Language *langs, int start, int max, const char *path */ void InitializeLanguagePacks() { + Searchpath sp; Language files[MAX_LANG]; - uint language_count = GetLanguageList(files, 0, lengthof(files), _paths.lang_dir); + uint language_count = 0; + + FOR_ALL_SEARCHPATHS(sp) { + char path[MAX_PATH]; + FioAppendDirectory(path, lengthof(path), sp, LANG_DIR); + language_count += GetLanguageList(files, language_count, lengthof(files), path); + } if (language_count == 0) error("No available language packs (invalid versions?)"); /* Sort the language names alphabetically */ |