diff options
author | Simon Howard | 2009-01-09 22:03:05 +0000 |
---|---|---|
committer | Simon Howard | 2009-01-09 22:03:05 +0000 |
commit | 15c1f099b40db912932c1574e4e98ec49ee0368a (patch) | |
tree | 586d3dbae83f3127dacc6b73f4fdc4b0576d5e26 /src/doom | |
parent | 7d5d16766337719cfda8555c007618ab45f9b132 (diff) | |
parent | 200b46f29ac8e00f909ecb381907c290b165b97e (diff) | |
download | chocolate-doom-15c1f099b40db912932c1574e4e98ec49ee0368a.tar.gz chocolate-doom-15c1f099b40db912932c1574e4e98ec49ee0368a.tar.bz2 chocolate-doom-15c1f099b40db912932c1574e4e98ec49ee0368a.zip |
Merge from trunk.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1428
Diffstat (limited to 'src/doom')
-rw-r--r-- | src/doom/d_main.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/doom/d_main.c b/src/doom/d_main.c index 70518a75..0bda5cbf 100644 --- a/src/doom/d_main.c +++ b/src/doom/d_main.c @@ -790,11 +790,20 @@ static void SetSaveGameDir(char *iwad_filename) basefile = sep + 1; } + // ~/.chocolate-doom/savegames/ + + savegamedir = Z_Malloc(strlen(configdir) + 30, PU_STATIC, 0); + sprintf(savegamedir, "%ssavegames%c", configdir, + DIR_SEPARATOR); + + M_MakeDirectory(savegamedir); + // eg. ~/.chocolate-doom/savegames/doom2.wad/ - savegamedir = malloc(strlen(configdir) + strlen(basefile) + 10); - sprintf(savegamedir, "%ssavegames%c%s%c", - configdir, DIR_SEPARATOR, basefile, DIR_SEPARATOR); + sprintf(savegamedir + strlen(savegamedir), "%s%c", + basefile, DIR_SEPARATOR); + + M_MakeDirectory(savegamedir); } // Check if the IWAD file is the Chex Quest IWAD. |