From cac1a2b2fa496bd5516f7def3d83880921d77cda Mon Sep 17 00:00:00 2001 From: walbourn_cp Date: Thu, 18 Oct 2012 11:36:11 -0700 Subject: [PATCH] DirectXTex: Fix for correctly writing valid 1D files --- DirectXTex/DirectXTexDDS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DirectXTex/DirectXTexDDS.cpp b/DirectXTex/DirectXTexDDS.cpp index 0146640..fc7ff93 100644 --- a/DirectXTex/DirectXTexDDS.cpp +++ b/DirectXTex/DirectXTexDDS.cpp @@ -531,8 +531,8 @@ HRESULT _EncodeDDSHeader( _In_ const TexMetadata& metadata, DWORD flags, return E_INVALIDARG; #endif - header->dwHeight = static_cast( metadata.height ); - header->dwWidth = header->dwDepth = 1; + header->dwWidth = static_cast( metadata.width ); + header->dwHeight = header->dwDepth = 1; break; case TEX_DIMENSION_TEXTURE2D: