From 02709e1699d0bfccd5623a2f99c9ff8cf34f1ccb Mon Sep 17 00:00:00 2001 From: castano Date: Tue, 13 Sep 2011 19:20:51 +0000 Subject: [PATCH] Set DDPF_FOURCC flag when using DX10 container. Fixes issue 165. --- src/nvimage/DirectDrawSurface.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nvimage/DirectDrawSurface.cpp b/src/nvimage/DirectDrawSurface.cpp index e176853..b947682 100644 --- a/src/nvimage/DirectDrawSurface.cpp +++ b/src/nvimage/DirectDrawSurface.cpp @@ -751,7 +751,7 @@ void DDSHeader::setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask void DDSHeader::setDX10Format(uint format) { - //this->pf.flags = 0; + this->pf.flags = DDPF_FOURCC; this->pf.fourcc = FOURCC_DX10; this->header10.dxgiFormat = format; } @@ -818,7 +818,10 @@ void DDSHeader::swapBytes() bool DDSHeader::hasDX10Header() const { - return this->pf.fourcc == FOURCC_DX10; + //if (pf.flags & DDPF_FOURCC) { + return this->pf.fourcc == FOURCC_DX10; + //} + //return false; } uint DDSHeader::signature() const