From e23c8e19fddde524b59acd59c2fe42aa45cf5f06 Mon Sep 17 00:00:00 2001 From: walbourn_cp Date: Fri, 30 Jan 2015 17:31:49 -0800 Subject: [PATCH] Code review feedback --- DirectXTex/DirectXTexP.h | 4 +++- ScreenGrab/ScreenGrab.cpp | 16 ++++------------ Texconv/texconv.cpp | 5 +++-- WICTextureLoader/WICTextureLoader.cpp | 5 ++++- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/DirectXTex/DirectXTexP.h b/DirectXTex/DirectXTexP.h index d5defd8..497b001 100644 --- a/DirectXTex/DirectXTexP.h +++ b/DirectXTex/DirectXTexP.h @@ -37,9 +37,11 @@ #pragma warning(push) #pragma warning(disable : 4005) #include -#include +#include #pragma warning(pop) +#include + #include "scoped.h" struct IWICImagingFactory; diff --git a/ScreenGrab/ScreenGrab.cpp b/ScreenGrab/ScreenGrab.cpp index 69e8e01..aaae201 100644 --- a/ScreenGrab/ScreenGrab.cpp +++ b/ScreenGrab/ScreenGrab.cpp @@ -25,6 +25,7 @@ // For 2D array textures and cubemaps, it captures only the first image in the array +#include #include #if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) || (_WIN32_WINNT > _WIN32_WINNT_WIN8) @@ -33,10 +34,12 @@ #pragma warning(push) #pragma warning(disable : 4005) #include -#include +#include #pragma warning(pop) #endif +#include + #include #include "ScreenGrab.h" @@ -455,17 +458,6 @@ static void GetSurfaceInfo( _In_ size_t width, planar = true; bpe = 4; break; - -#if defined(_XBOX_ONE) && defined(_TITLE) - - case DXGI_FORMAT_D16_UNORM_S8_UINT: - case DXGI_FORMAT_R16_UNORM_X8_TYPELESS: - case DXGI_FORMAT_X16_TYPELESS_G8_UINT: - planar = true; - bpe = 4; - break; - -#endif } if (bc) diff --git a/Texconv/texconv.cpp b/Texconv/texconv.cpp index bd95352..24bb45a 100644 --- a/Texconv/texconv.cpp +++ b/Texconv/texconv.cpp @@ -12,7 +12,8 @@ #include #include -#include + +#include #include @@ -495,7 +496,7 @@ bool CreateDevice( _Outptr_ ID3D11Device** pDevice ) if ( !hModD3D11 ) return false; - s_DynamicD3D11CreateDevice = reinterpret_cast( GetProcAddress( hModD3D11, "D3D11CreateDevice" ) ); + s_DynamicD3D11CreateDevice = reinterpret_cast( reinterpret_cast( GetProcAddress( hModD3D11, "D3D11CreateDevice" ) ) ); if ( !s_DynamicD3D11CreateDevice ) return false; } diff --git a/WICTextureLoader/WICTextureLoader.cpp b/WICTextureLoader/WICTextureLoader.cpp index 040398a..01d4178 100644 --- a/WICTextureLoader/WICTextureLoader.cpp +++ b/WICTextureLoader/WICTextureLoader.cpp @@ -28,15 +28,18 @@ // We could load multi-frame images (TIFF/GIF) into a texture array. // For now, we just load the first frame (note: DirectXTex supports multi-frame images) +#include #include // VS 2010's stdint.h conflicts with intsafe.h #pragma warning(push) #pragma warning(disable : 4005) #include -#include +#include #pragma warning(pop) +#include + #include #include "WICTextureLoader.h"