From 65a107a94106b503de9e29c5aa4dd34318773402 Mon Sep 17 00:00:00 2001 From: NovaRain Date: Tue, 5 May 2026 21:12:27 +0800 Subject: [PATCH] Increased decompression buffer size to 4KB (ref. fallout2-ce/fallout2-ce#439) --- sfall/Modules/FileSystem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sfall/Modules/FileSystem.cpp b/sfall/Modules/FileSystem.cpp index 1bf459d7..ba61ca16 100644 --- a/sfall/Modules/FileSystem.cpp +++ b/sfall/Modules/FileSystem.cpp @@ -771,6 +771,10 @@ void FileSystem::init() { // Fix file seeking in uncompressed database files HookCall(0x4E5B52, dfile_fseek_hook); + // Increase decompression buffer size for reading compressed database files + const DWORD dfileBufSizeAddr[] = {0x4E5EE0, 0x4E60D9, 0x4E60E0}; + SafeWriteBatch(4096, dfileBufSizeAddr); // was 1024 + // Warning message when there are more than 16 open files (max 20) HookCall(0x4EE0DE, sopen_hook_warning); // Error message "Failed to open file"