1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-29 03:19:44 +00:00

Merge the two identical conditions

This commit is contained in:
Cédric Mocquillon 2023-03-06 21:25:53 +01:00
parent 1a7b2cd611
commit 64ce6eb6bc

View File

@ -350,7 +350,7 @@ BsaVersion Bsa::BSAFile::detectVersion(const std::filesystem::path& filePath)
return BSAVER_UNCOMPRESSED;
}
if (head[0] == static_cast<uint32_t>(BSAVER_COMPRESSED))
if (head[0] == static_cast<uint32_t>(BSAVER_COMPRESSED) || head[0] == ESM::fourCC("BTDX"))
{
if (head[1] == static_cast<uint32_t>(0x01))
{
@ -363,17 +363,5 @@ BsaVersion Bsa::BSAFile::detectVersion(const std::filesystem::path& filePath)
return BSAVER_COMPRESSED;
}
if (head[0] == ESM::fourCC("BTDX"))
{
if (head[1] == static_cast<uint32_t>(0x01))
{
if (head[2] == ESM::fourCC("GNRL"))
return BSAVER_BA2_GNRL;
if (head[2] == ESM::fourCC("DX10"))
return BSAVER_BA2_DX10;
}
return BSAVER_COMPRESSED;
}
return BSAVER_UNKNOWN;
}