diff options
Diffstat (limited to 'common/file.cpp')
-rw-r--r-- | common/file.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/file.cpp b/common/file.cpp index 1be6f6a7a5..7f948f7bc7 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -85,6 +85,17 @@ static FILE *fopenNoCase(const char *filename, const char *directory, const char file = fopen(buf, mode); } +#ifdef __amigaos4__ + // + // Work around for possibility that someone uses AmigaOS "newlib" build with SmartFileSystem (blocksize 512 bytes), leading + // to buffer size being only 512 bytes. "Clib2" sets the buffer size to 8KB, resulting smooth movie playback. This forces the buffer + // to be enough also when using "newlib" compile on SFS. + // + if (file) { + setvbuf(file, NULL, _IOFBF, 8192); + } +#endif + return file; } |