GFPAK : Adjust how compression is checked.

This commit is contained in:
KillzXGaming 2022-02-22 19:59:04 -05:00
parent 6049e23669
commit b9b198cccb
2 changed files with 5 additions and 7 deletions

View file

@ -549,13 +549,6 @@ namespace FirstPlugin
GFPAKHashCache.EnsureHashCache();
version = reader.ReadInt32();
if (version == 0x1000 && !File.Exists($"{Runtime.ExecutableDir}\\oo2core_6_win64.dll"))
{
MessageBox.Show("It is necessary to have 'oo2core_6_win64.dll' in the executable folder.");
return;
}
uint padding = reader.ReadUInt32();
uint FileCount = reader.ReadUInt32();
FolderCount = reader.ReadInt32();

View file

@ -717,6 +717,11 @@ namespace Toolbox.Library.IO
{
public static byte[] Decompress(byte[] data, int decompressedSize)
{
if (!File.Exists($"{Runtime.ExecutableDir}\\oo2core_6_win64.dll"))
{
MessageBox.Show("'oo2core_6_win64.dll' not found in the executable folder! User must provide their own copy!");
return data;
}
return Toolbox.Library.Compression.Oodle.Decompress(data, decompressedSize);
}