diff options
-rw-r--r-- | src/setup/mainmenu.c | 2 | ||||
-rw-r--r-- | src/setup/mode.c | 14 |
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) |