mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-15 06:20:14 +02:00
Fixed problem loading DDS files that use FOURCC but have extra irrelevant bits set
This commit is contained in:
parent
908869c96e
commit
43969ca15f
@ -166,14 +166,15 @@ namespace
|
|||||||
{
|
{
|
||||||
const LegacyDDS* entry = &g_LegacyDDSMap[index];
|
const LegacyDDS* entry = &g_LegacyDDSMap[index];
|
||||||
|
|
||||||
if (ddpfFlags == entry->ddpf.flags)
|
if ((ddpfFlags & DDS_FOURCC) && (entry->ddpf.flags & DDS_FOURCC))
|
||||||
{
|
{
|
||||||
if (entry->ddpf.flags & DDS_FOURCC)
|
// In case of FourCC codes, ignore any other bits in ddpf.flags
|
||||||
{
|
if (ddpf.fourCC == entry->ddpf.fourCC)
|
||||||
if (ddpf.fourCC == entry->ddpf.fourCC)
|
break;
|
||||||
break;
|
}
|
||||||
}
|
else if (ddpfFlags == entry->ddpf.flags)
|
||||||
else if (entry->ddpf.flags & DDS_PAL8)
|
{
|
||||||
|
if (entry->ddpf.flags & DDS_PAL8)
|
||||||
{
|
{
|
||||||
if (ddpf.RGBBitCount == entry->ddpf.RGBBitCount)
|
if (ddpf.RGBBitCount == entry->ddpf.RGBBitCount)
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user