From ff55a25199b58dd4a92f279b938768085a87ae0d Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Wed, 10 Mar 2021 14:15:25 +0100 Subject: [PATCH] Fixed #include of DXGI header Fixes #13 --- src/D3D12MemAlloc.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/D3D12MemAlloc.h b/src/D3D12MemAlloc.h index d340b81..a8c3799 100644 --- a/src/D3D12MemAlloc.h +++ b/src/D3D12MemAlloc.h @@ -637,6 +637,13 @@ Features deliberately excluded from the scope of this library: are not going to be included into this repository. */ +// If using this library on a platform different than Windows PC or want to use different version of DXGI, +// you should include D3D12-compatible headers before this library on your own and define this macro. +#ifndef D3D12MA_D3D12_HEADERS_ALREADY_INCLUDED + #include + #include +#endif + // Define this macro to 0 to disable usage of DXGI 1.4 (needed for IDXGIAdapter3 and query for memory budget). #ifndef D3D12MA_DXGI_1_4 #ifdef __IDXGIAdapter3_INTERFACE_DEFINED__ @@ -646,13 +653,6 @@ Features deliberately excluded from the scope of this library: #endif #endif -// If using this library on a platform different than Windows PC, you should -// include D3D12-compatible header before this library on your own and define this macro. -#ifndef D3D12MA_D3D12_HEADERS_ALREADY_INCLUDED - #include - #include -#endif - /* When defined to value other than 0, the library will try to use D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT or D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT