diff options
author | Franklin Wei <franklin@rockbox.org> | 2019-07-29 21:05:00 -0400 |
---|---|---|
committer | Franklin Wei <franklin@rockbox.org> | 2019-07-30 03:44:43 +0200 |
commit | 94109a95062cb9830dc4452142dc65e905b7433f (patch) | |
tree | ec69b66b789be94412a3c618ca79da56a192f5e2 | |
parent | 5e0bd5bfc093ceca8fd7313ab6410e2a43fdb1c9 (diff) | |
download | rockbox-94109a95062cb9830dc4452142dc65e905b7433f.tar.gz rockbox-94109a95062cb9830dc4452142dc65e905b7433f.zip |
quake: fix file loading errors
Forgot a return statement in Sys_FileRead (which slipped by since I've made
the questionable decision to disable all warnings...)
Change-Id: Ia0f3da52b43765b8e0e9953893ac7957ec2f6c2e
-rw-r--r-- | apps/plugins/sdl/progs/quake/sys_sdl.c | 10 |
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 | ||
226 | int Sys_FileOpenWrite (char *path) | 234 | int Sys_FileOpenWrite (char *path) |