summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2014-10-19 17:02:26 -0400
committerSimon Howard2014-10-19 17:02:26 -0400
commit084587ecb43ea3acdc43db3f583d657ff0219b2a (patch)
tree022963c60f2e52463134b3c1452d017ab80a8168
parent16c56ea0c4476f4d908a4f8073cab48cdfe43005 (diff)
downloadchocolate-doom-084587ecb43ea3acdc43db3f583d657ff0219b2a.tar.gz
chocolate-doom-084587ecb43ea3acdc43db3f583d657ff0219b2a.tar.bz2
chocolate-doom-084587ecb43ea3acdc43db3f583d657ff0219b2a.zip
doom: Write -cdrom savegames to c:\doomdata.
When using the -cdrom command line parameter (does anyone still use that?), savegames should be written to c:\doomdata to properly reproduce Vanilla behavior. These were being incorrectly written to c:\doomdata\savegames\foo.wad instead. This fixes #175. Thanks Alexandre-Xavier.
-rw-r--r--src/doom/d_main.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/doom/d_main.c b/src/doom/d_main.c
index 733a11fb..c7987b90 100644
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -1250,7 +1250,7 @@ void D_DoomMain (void)
// allowing play from CD.
//
- if (M_CheckParm("-cdrom") > 0)
+ if (M_ParmExists("-cdrom"))
{
printf(D_CDROM);
@@ -1263,7 +1263,7 @@ void D_DoomMain (void)
M_SetConfigDir(NULL);
}
-
+
//!
// @arg <x>
// @vanilla
@@ -1468,7 +1468,18 @@ void D_DoomMain (void)
// Set the gamedescription string. This is only possible now that
// we've finished loading Dehacked patches.
D_SetGameDescription();
- savegamedir = M_GetSaveGameDir(D_SaveGameIWADName(gamemission));
+
+#ifdef _WIN32
+ // In -cdrom mode, we write savegames to c:\doomdata as well as configs.
+ if (M_ParmExists("-cdrom"))
+ {
+ savegamedir = configdir;
+ }
+ else
+#endif
+ {
+ savegamedir = M_GetSaveGameDir(D_SaveGameIWADName(gamemission));
+ }
// Check for -file in shareware
if (modifiedgame)