forked from mirror/OpenTTD
(svn r7274) -Codechange [utf8]: Add input/output unicode support. This actually only changes win32
since it uses UTF16 for file access. To keep os-specific code to a minimum, OpenTTD uses UTF8 internally everywhere, converting to OS-type when needed (save/load/screenshot/etc.)
This commit is contained in:
@@ -1228,10 +1228,11 @@ static int GetLanguageList(char **languages, int max)
|
||||
dir = opendir(_path.lang_dir);
|
||||
if (dir != NULL) {
|
||||
while ((dirent = readdir(dir)) != NULL) {
|
||||
char *t = strrchr(dirent->d_name, '.');
|
||||
const char *d_name = FS2OTTD(dirent->d_name);
|
||||
char *t = strrchr(d_name, '.');
|
||||
|
||||
if (t != NULL && strcmp(t, ".lng") == 0) {
|
||||
languages[num++] = strdup(dirent->d_name);
|
||||
languages[num++] = strdup(d_name);
|
||||
if (num == max) break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user