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 | |
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')
-rw-r--r-- | src/doom/d_main.c | 15 | ||||
-rw-r--r-- | src/w_file.c | 6 |
2 files changed, 15 insertions, 6 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. diff --git a/src/w_file.c b/src/w_file.c index b5bb6a45..61883adb 100644 --- a/src/w_file.c +++ b/src/w_file.c @@ -60,11 +60,11 @@ wad_file_t *W_OpenFile(char *path) int i; //! - // Do not use the OS's virtual memory subsystem to map WAD files + // Use the OS's virtual memory subsystem to map WAD files // directly into memory. // - if (M_CheckParm("-nommap") > 0) + if (M_CheckParm("-mmap") < 0) { return stdc_wad_file.OpenFile(path); } @@ -73,7 +73,7 @@ wad_file_t *W_OpenFile(char *path) result = NULL; - for (i=0; i<arrlen(wad_file_classes); ++i) + for (i=0; i<arrlen(wad_file_classes); ++i) { result = wad_file_classes[i]->OpenFile(path); |