diff options
-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); |