summaryrefslogtreecommitdiff
path: root/os2.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-03-25 09:22:10 +0000
committerDarkvater <darkvater@openttd.org>2006-03-25 09:22:10 +0000
commit9b5d8a9921d0f8a0ed5b9dd0f3d796a35c342f8c (patch)
tree86d8ae1e4f41e2d9e2ecfe600c9e0bcd66d31b18 /os2.c
parent6cafd5f0e33f44818cc128ad3b1a140a3215e853 (diff)
downloadopenttd-9b5d8a9921d0f8a0ed5b9dd0f3d796a35c342f8c.tar.xz
(svn r4105) - Feature: Add proper ISO-8859-15 <> LOCALCODE conversion. As the mess that is makefile can't properly support it at the moment, it is only available for MACOSX. Windows doesn't need FS conversion and I have no idea about OS/2 so it's disabled for them.
- CodeChange: Change the function GetCurrentLocale(). It returns the locale from some default environment-variables, plus a custom one defined as parameter. If all fail, it tries $LANG.
Diffstat (limited to 'os2.c')
-rw-r--r--os2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/os2.c b/os2.c
index 3b6c48e2c..aa3aee58c 100644
--- a/os2.c
+++ b/os2.c
@@ -108,7 +108,7 @@ FiosItem *FiosGetSavegameList(int *num, int mode)
fios->type = FIOS_TYPE_DIR;
fios->mtime = 0;
ttd_strlcpy(fios->name, dirent->d_name, lengthof(fios->name));
- snprintf(fios->title, lengthof(fios->title), "%s\\ (Directory)", dirent->d_name);
+ snprintf(fios->title, lengthof(fios->title), "%s\\ (Directory)", FS2OTTD(dirent->d_name));
str_validate(fios->title);
}
}
@@ -150,7 +150,7 @@ FiosItem *FiosGetSavegameList(int *num, int mode)
ttd_strlcpy(fios->name, dirent->d_name, lengthof(fios->name));
*t = '\0'; // strip extension
- ttd_strlcpy(fios->title, dirent->d_name, lengthof(fios->title));
+ ttd_strlcpy(fios->title, FS2OTTD(dirent->d_name), lengthof(fios->title));
str_validate(fios->title);
} else if (mode == SLD_LOAD_GAME || mode == SLD_LOAD_SCENARIO) {
if (strcasecmp(t, ".ss1") == 0 ||
@@ -237,7 +237,7 @@ FiosItem *FiosGetScenarioList(int *num, int mode)
fios->type = FIOS_TYPE_DIR;
fios->mtime = 0;
ttd_strlcpy(fios->name, dirent->d_name, lengthof(fios->name));
- snprintf(fios->title, lengthof(fios->title), "%s\\ (Directory)", dirent->d_name);
+ snprintf(fios->title, lengthof(fios->title), "%s\\ (Directory)", FS2OTTD(dirent->d_name));
str_validate(fios->title);
}
}
@@ -278,7 +278,7 @@ FiosItem *FiosGetScenarioList(int *num, int mode)
ttd_strlcpy(fios->name, dirent->d_name, lengthof(fios->name));
*t = '\0'; // strip extension
- ttd_strlcpy(fios->title, dirent->d_name, lengthof(fios->title));
+ ttd_strlcpy(fios->title, FS2OTTD(dirent->d_name), lengthof(fios->title));
str_validate(fios->title);
} else if (mode == SLD_LOAD_GAME || mode == SLD_LOAD_SCENARIO ||
mode == SLD_NEW_GAME) {