summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2011-10-20 23:05:52 +0000
committerSimon Howard2011-10-20 23:05:52 +0000
commit383693bad415070e20b66d105d9a6147fd27a39a (patch)
tree971dd27084688a0495591aeb6b3507f80f40164d
parent31a58552ffc647d2c87b557441d3725c6fba2b37 (diff)
downloadchocolate-doom-383693bad415070e20b66d105d9a6147fd27a39a.tar.gz
chocolate-doom-383693bad415070e20b66d105d9a6147fd27a39a.tar.bz2
chocolate-doom-383693bad415070e20b66d105d9a6147fd27a39a.zip
Fix bug with Hexen savedir set to "(null)" by setup tool (thanks
Alexandre Xavier). Subversion-branch: /branches/v2-branch Subversion-revision: 2447
-rw-r--r--src/setup/mainmenu.c2
-rw-r--r--src/setup/mode.c14
2 files changed, 15 insertions, 1 deletions
diff --git a/src/setup/mainmenu.c b/src/setup/mainmenu.c
index 4256c408..bfe2cdf7 100644
--- a/src/setup/mainmenu.c
+++ b/src/setup/mainmenu.c
@@ -259,12 +259,12 @@ void MainMenu(void)
static void InitConfig(void)
{
+ M_SetConfigDir(NULL);
InitBindings();
SetChatMacroDefaults();
SetPlayerNameDefault();
- M_SetConfigDir(NULL);
M_LoadDefaults();
}
diff --git a/src/setup/mode.c b/src/setup/mode.c
index 53a74314..88924ad8 100644
--- a/src/setup/mode.c
+++ b/src/setup/mode.c
@@ -128,6 +128,20 @@ static void BindMiscVariables(void)
{
M_BindVariable("savedir", &savedir);
M_BindVariable("messageson", &showMessages);
+
+ // Hexen has a variable to control the savegame directory
+ // that is used.
+
+ savedir = M_GetSaveGameDir("hexen.wad");
+
+ // On Windows, hexndata\ is the default.
+
+ if (!strcmp(savedir, ""))
+ {
+ free(savedir);
+ savedir = malloc(10);
+ sprintf(savedir, "hexndata%c", DIR_SEPARATOR);
+ }
}
if (gamemission == strife)