diff options
author | Simon Howard | 2008-05-04 17:09:51 +0000 |
---|---|---|
committer | Simon Howard | 2008-05-04 17:09:51 +0000 |
commit | 72680b42095864ec2d4affa55e0831e4d8712b6d (patch) | |
tree | 51bb9c6eb792f8d2eb74268758217330a9a8b7c3 | |
parent | 24c3f6943b226b02a2bbadbe72b3731aa2e90803 (diff) | |
download | chocolate-doom-72680b42095864ec2d4affa55e0831e4d8712b6d.tar.gz chocolate-doom-72680b42095864ec2d4affa55e0831e4d8712b6d.tar.bz2 chocolate-doom-72680b42095864ec2d4affa55e0831e4d8712b6d.zip |
Add command line option to disable mmapped WAD I/O.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1139
-rw-r--r-- | src/w_file.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/w_file.c b/src/w_file.c index 75c2eae4..bd1a99bd 100644 --- a/src/w_file.c +++ b/src/w_file.c @@ -28,6 +28,7 @@ #include "doomdef.h" #include "doomtype.h" +#include "m_argv.h" #include "w_file.h" @@ -57,6 +58,16 @@ wad_file_t *W_OpenFile(char *path) wad_file_t *result; int i; + //! + // Do not use the OS's virtual memory subsystem to map WAD files + // directly into memory. + // + + if (M_CheckParm("-nommap") > 0) + { + return stdc_wad_file.OpenFile(path); + } + // Try all classes in order until we find one that works result = NULL; |