mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Merge the two identical conditions
This commit is contained in:
parent
1a7b2cd611
commit
64ce6eb6bc
@ -350,7 +350,7 @@ BsaVersion Bsa::BSAFile::detectVersion(const std::filesystem::path& filePath)
|
|||||||
return BSAVER_UNCOMPRESSED;
|
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))
|
if (head[1] == static_cast<uint32_t>(0x01))
|
||||||
{
|
{
|
||||||
@ -363,17 +363,5 @@ BsaVersion Bsa::BSAFile::detectVersion(const std::filesystem::path& filePath)
|
|||||||
return BSAVER_COMPRESSED;
|
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;
|
return BSAVER_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user