Explorar o código

allow keep file in cache if it fits

ncannasse %!s(int64=7) %!d(string=hai) anos
pai
achega
08e1a91e4c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      hxd/fmt/pak/FileSystem.hx

+ 1 - 1
hxd/fmt/pak/FileSystem.hx

@@ -233,7 +233,7 @@ class FileSystem implements hxd.fs.FileSystem {
 		var index = readCache.lastIndexOf(e);
 		if( index < 0 ) {
 			// don't cache if too big wrt our size
-			if( e.openedBytes.length >= (readCacheSize >> 1) )
+			if( e.openedBytes.length > readCacheSize )
 				return;
 			readCache.push(e);
 			e.cachedBytes = e.openedBytes;