From 47df8ff7d6b07087801c997396bd31a0e005736f Mon Sep 17 00:00:00 2001 From: castano Date: Thu, 21 Oct 2010 18:58:49 +0000 Subject: [PATCH] Fix readBlock. Fixes issue 145. --- src/nvimage/DirectDrawSurface.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/nvimage/DirectDrawSurface.cpp b/src/nvimage/DirectDrawSurface.cpp index 5f229b3..c4861f1 100644 --- a/src/nvimage/DirectDrawSurface.cpp +++ b/src/nvimage/DirectDrawSurface.cpp @@ -1276,16 +1276,13 @@ void DirectDrawSurface::readBlock(ColorBlock * rgba) *stream << block; block.decodeBlock(rgba); } - else if (fourcc == FOURCC_DXT2 || - header.pf.fourcc == FOURCC_DXT3) + else if (fourcc == FOURCC_DXT2 || fourcc == FOURCC_DXT3) { BlockDXT3 block; *stream << block; block.decodeBlock(rgba); } - else if (fourcc == FOURCC_DXT4 || - header.pf.fourcc == FOURCC_DXT5 || - header.pf.fourcc == FOURCC_RXGB) + else if (fourcc == FOURCC_DXT4 || fourcc == FOURCC_DXT5 || fourcc == FOURCC_RXGB) { BlockDXT5 block; *stream << block;