mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 03:29:55 +00:00
Properly detect the version for post-FO4 BA2 formats
This commit is contained in:
parent
f796e051cb
commit
61b6150c01
1 changed files with 9 additions and 9 deletions
|
@ -340,18 +340,18 @@ BsaVersion Bsa::BSAFile::detectVersion(const std::filesystem::path& filePath)
|
||||||
return BsaVersion::Uncompressed;
|
return BsaVersion::Uncompressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (head[0] == static_cast<uint32_t>(BsaVersion::Compressed) || head[0] == ESM::fourCC("BTDX"))
|
if (head[0] == static_cast<uint32_t>(BsaVersion::Compressed))
|
||||||
{
|
{
|
||||||
if (head[1] == static_cast<uint32_t>(0x01))
|
|
||||||
{
|
|
||||||
if (head[2] == ESM::fourCC("GNRL"))
|
|
||||||
return BsaVersion::BA2GNRL;
|
|
||||||
if (head[2] == ESM::fourCC("DX10"))
|
|
||||||
return BsaVersion::BA2DX10;
|
|
||||||
return BsaVersion::Unknown;
|
|
||||||
}
|
|
||||||
return BsaVersion::Compressed;
|
return BsaVersion::Compressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (head[0] == ESM::fourCC("BTDX"))
|
||||||
|
{
|
||||||
|
if (head[2] == ESM::fourCC("GNRL"))
|
||||||
|
return BsaVersion::BA2GNRL;
|
||||||
|
if (head[2] == ESM::fourCC("DX10"))
|
||||||
|
return BsaVersion::BA2DX10;
|
||||||
|
}
|
||||||
|
|
||||||
return BsaVersion::Unknown;
|
return BsaVersion::Unknown;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue