ref: 72680b42095864ec2d4affa55e0831e4d8712b6d
parent: 24c3f6943b226b02a2bbadbe72b3731aa2e90803
author: Simon Howard <fraggle@gmail.com>
date: Sun May 4 13:09:51 EDT 2008
Add command line option to disable mmapped WAD I/O. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1139
--- 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"
@@ -56,6 +57,16 @@
{
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