summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/sdl/progs/quake/sys_sdl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/plugins/sdl/progs/quake/sys_sdl.c b/apps/plugins/sdl/progs/quake/sys_sdl.c
index 44411bd153..efc285915b 100644
--- a/apps/plugins/sdl/progs/quake/sys_sdl.c
+++ b/apps/plugins/sdl/progs/quake/sys_sdl.c
@@ -168,13 +168,19 @@ static int Qfilelength (FILE *f)
168} 168}
169 169
170#define CACHE_THRESHOLD (1024*1024) 170#define CACHE_THRESHOLD (1024*1024)
171#define CACHE_ENABLE
171 172
172/* really rough guesses */ 173/* really rough guesses */
174
175#ifdef CACHE_ENABLE
173#if MEMORYSIZE >= 64 176#if MEMORYSIZE >= 64
174#define MAX_CACHE (32*1024*1024) 177#define MAX_CACHE (32*1024*1024)
175#elif MEMORYSIZE >= 32 178#elif MEMORYSIZE >= 32
176#define MAX_CACHE (20*1024*1024) 179#define MAX_CACHE (20*1024*1024)
177#else 180#endif
181#endif
182
183#ifndef MAX_CACHE
178#define MAX_CACHE 0 184#define MAX_CACHE 0
179#endif 185#endif
180 186
@@ -221,6 +227,8 @@ int Sys_FileOpenRead (char *path, int *hndl)
221 } 227 }
222 } 228 }
223 } 229 }
230
231 return len;
224} 232}
225 233
226int Sys_FileOpenWrite (char *path) 234int Sys_FileOpenWrite (char *path)