summaryrefslogtreecommitdiff
path: root/win32.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-03-10 21:44:17 +0000
committerDarkvater <darkvater@openttd.org>2005-03-10 21:44:17 +0000
commita0ef37e7bccb18a8569962fd5690f288a888b3fa (patch)
tree6e63b5cea00b6775271b90770a8b1992c42d59a6 /win32.c
parent8064254eaff5f0ed93b3a1ff38be2560c84a57f6 (diff)
downloadopenttd-a0ef37e7bccb18a8569962fd5690f288a888b3fa.tar.xz
(svn r1986) - Fix: free _config_file when shutting down openttd. Strange that Valgrind didn't catch this, kudos to TrueLight
- Feature (small): new command-line option -c <config_file>. You can have OpenTTD load alternative config files with this setup, handy for servers, or for saves from other players if you don't want to rename your own config. This will have to do until all game-related settings are saved ingame. Couldn't find the SF patch, so credits to the guy that wrote it.
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/win32.c b/win32.c
index e9b636519..849c66e08 100644
--- a/win32.c
+++ b/win32.c
@@ -2131,7 +2131,9 @@ void DeterminePaths(void)
_path.data_dir = str_fmt("%sdata\\", cfg);
_path.lang_dir = str_fmt("%slang\\", cfg);
- _config_file = str_fmt("%sopenttd.cfg", _path.personal_dir);
+ if (_config_file == NULL)
+ _config_file = str_fmt("%sopenttd.cfg", _path.personal_dir);
+
_highscore_file = str_fmt("%shs.dat", _path.personal_dir);
_log_file = str_fmt("%sopenttd.log", _path.personal_dir);