Fixed #include of DXGI header
Fixes #13
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 @@
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 <d3d12.h>
+ #include <dxgi1_4.h>
+#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 @@
#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 <d3d12.h>
- #include <dxgi.h>
-#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