From 81c4b7d2ae7ce161da63b80c7c3e0729275ba311 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Wed, 27 Aug 2014 20:11:23 -0700 Subject: [PATCH] Fixed VS2012 warning when DXSDK and WindowsSDK are included. --- src/renderer_d3d11.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/renderer_d3d11.h b/src/renderer_d3d11.h index f316107c..5d44e053 100644 --- a/src/renderer_d3d11.h +++ b/src/renderer_d3d11.h @@ -14,7 +14,15 @@ #endif // !USE_D3D11_DYNAMIC_LIB #define D3D11_NO_HELPERS -#include +#if BX_COMPILER_MSVC +# pragma warning(push) +// winerror.h and dxgitypes.h both define DXGI_ERRORs. +# pragma warning(disable:4005) // warning C4005: '' : macro redefinition +# include +# pragma warning(pop) +#else +# include +#endif // BX_COMPILER_MSVC #include "renderer_d3d.h" #define D3DCOLOR_ARGB(_a, _r, _g, _b) ( (DWORD)( ( ( (_a)&0xff)<<24)|( ( (_r)&0xff)<<16)|( ( (_g)&0xff)<<8)|( (_b)&0xff) ) )