summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/progs/quake/sys_sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sdl/progs/quake/sys_sdl.c')
-rw-r--r--apps/plugins/sdl/progs/quake/sys_sdl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/plugins/sdl/progs/quake/sys_sdl.c b/apps/plugins/sdl/progs/quake/sys_sdl.c
index 44411bd..4c0c88f 100644
--- a/apps/plugins/sdl/progs/quake/sys_sdl.c
+++ b/apps/plugins/sdl/progs/quake/sys_sdl.c
@@ -168,8 +168,11 @@ static int Qfilelength (FILE *f)
}
#define CACHE_THRESHOLD (1024*1024)
+//#define CACHE_ENABLE
/* really rough guesses */
+
+#ifdef CACHE_ENABLE
#if MEMORYSIZE >= 64
#define MAX_CACHE (32*1024*1024)
#elif MEMORYSIZE >= 32
@@ -177,6 +180,9 @@ static int Qfilelength (FILE *f)
#else
#define MAX_CACHE 0
#endif
+#else
+#define MAX_CACHE 0
+#endif
static int cache_left = MAX_CACHE;
@@ -221,6 +227,8 @@ int Sys_FileOpenRead (char *path, int *hndl)
}
}
}
+
+ return len;
}
int Sys_FileOpenWrite (char *path)