summaryrefslogtreecommitdiff
path: root/src/saveload.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-03 00:58:59 +0000
committerrubidium <rubidium@openttd.org>2009-01-03 00:58:59 +0000
commit35f5783c62fd52fb07bf7c82224874d0a0084fd4 (patch)
tree9607ee17b88433bd8c52525be29f9105ea278417 /src/saveload.cpp
parentaff7feb767a4efa5221762b253fbe329ae65df10 (diff)
downloadopenttd-35f5783c62fd52fb07bf7c82224874d0a0084fd4.tar.xz
(svn r14792) -Feature: make the date format for default savegame/screenshot names configurable
Diffstat (limited to 'src/saveload.cpp')
-rw-r--r--src/saveload.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/saveload.cpp b/src/saveload.cpp
index 79c81731c..2fb119e17 100644
--- a/src/saveload.cpp
+++ b/src/saveload.cpp
@@ -1829,7 +1829,13 @@ void GenerateDefaultSaveName(char *buf, const char *last)
/* Check if we are not a spectator who wants to generate a name..
* Let's use the name of company #0 for now. */
SetDParam(0, IsValidCompanyID(_local_company) ? _local_company : COMPANY_FIRST);
- SetDParam(1, _date);
+ switch (_settings_client.gui.date_format_in_default_names) {
+ case 0: SetDParam(1, STR_JUST_DATE_LONG); break;
+ case 1: SetDParam(1, STR_JUST_DATE_TINY); break;
+ case 2: SetDParam(1, STR_JUST_DATE_ISO); break;
+ default: NOT_REACHED();
+ }
+ SetDParam(2, _date);
GetString(buf, STR_4004, last);
SanitizeFilename(buf);
}