ref: 15c1f099b40db912932c1574e4e98ec49ee0368a
parent: 7d5d16766337719cfda8555c007618ab45f9b132
parent: 200b46f29ac8e00f909ecb381907c290b165b97e
author: Simon Howard <fraggle@gmail.com>
date: Fri Jan 9 17:03:05 EST 2009
Merge from trunk. Subversion-branch: /branches/raven-branch Subversion-revision: 1428
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -790,11 +790,20 @@
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.
--- a/src/w_file.c
+++ b/src/w_file.c
@@ -60,11 +60,11 @@
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 @@
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);