From 084587ecb43ea3acdc43db3f583d657ff0219b2a Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 19 Oct 2014 17:02:26 -0400 Subject: 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. --- src/doom/d_main.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/doom/d_main.c') 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 // @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) -- cgit v1.2.3