LCEMP commit: multiple savefile fixes

This commit is contained in:
pieeebot committed 2026-08-14 14:39:13 +03:00
1 parent feeff55924
commit 494235878e
13 files changed
+94 -32

No files matched your search

+3 -2
View File
@@ -10,13 +10,14 @@ private:
static const int MAX_CACHE_SIZE = 256;
unordered_map<File, RegionFile *, FileKeyHash, FileKeyEq> cache;
CRITICAL_SECTION m_cs;
static RegionFileCache s_defaultCache;
public:
// Made public and non-static so we can have a cache for input and output files
RegionFileCache() {}
~RegionFileCache();
RegionFileCache() { InitializeCriticalSectionAndSpinCount(&m_cs, 4000); }
~RegionFileCache() { DeleteCriticalSection(&m_cs); _clear(); }
RegionFile *_getRegionFile(ConsoleSaveFile *saveFile, const wstring &prefix, int chunkX, int chunkZ); // 4J - TODO was synchronized
void _clear(); // 4J - TODO was synchronized