summaryrefslogtreecommitdiff
path: root/src/stdafx.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-02-08 23:46:25 +0000
committertruelight <truelight@openttd.org>2007-02-08 23:46:25 +0000
commit7cd68b5a072ce788e3a9fad0767b2015d397ee73 (patch)
treebda0f305d17d31d1e4b13d4d3937b315b0ed0037 /src/stdafx.h
parent424001168d89da0c58e426e808f175598bc15eb9 (diff)
downloadopenttd-7cd68b5a072ce788e3a9fad0767b2015d397ee73.tar.xz
(svn r8647) -Codechange: add a general way to handle platforms who can only have a limited amount of file-descripters open at any given time.
The Fios keeps track how many times a file is opened, and tries to close up files which aren't used often. The first platform using this is PSP. Patch based on the work of Turulo.
Diffstat (limited to 'src/stdafx.h')
-rw-r--r--src/stdafx.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index d2d57d1d9..29f32c3ce 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -77,6 +77,13 @@
# define BSWAP16(x) ((x) >> 8 | (x) << 8)
#endif /* __APPLE__ */
+#if defined(PSP)
+/* PSP can only have 10 file-descriptors open at any given time, but this
+ * switch only limits reads via the Fio system. So keep 2 fds free for things
+ * like saving a game. */
+#define LIMITED_FDS 8
+#endif /* PSP */
+
/* by default we use [] var arrays */
#define VARARRAY_SIZE