0.2.0-dev Download ZIP
34 lines ·1.7 KB Raw
| 1 | diff --git a/thirdparty/d3d12ma/D3D12MemAlloc.cpp b/thirdparty/d3d12ma/D3D12MemAlloc.cpp |
| 2 | index 61e9e4a34d..94c646b5fc 100644 |
| 3 | --- a/thirdparty/d3d12ma/D3D12MemAlloc.cpp |
| 4 | +++ b/thirdparty/d3d12ma/D3D12MemAlloc.cpp |
| 5 | @@ -33,24 +33,11 @@ |
| 6 | #include <shared_mutex> |
| 7 | #endif |
| 8 | |
| 9 | -// On older mingw versions, using the Agility SDK will cause linker errors unless dxguids.h is included. |
| 10 | -// But on newer mingw versions, the includes aren't necessary thus no need to grab DirectX-Headers. |
| 11 | -// Release cycles are slow for LTS distros on Linux, so this codeblock will need to stay for a few years. |
| 12 | -#if defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR) && \ |
| 13 | - defined(__MINGW64_VERSION_BUGFIX) && defined(__ID3D12Device8_INTERFACE_DEFINED__) |
| 14 | - #define D3D12MA_MAKE_MINGW_VERSION(x, y, z) ((x << 20u) | (y << 10u) | (z)) |
| 15 | - #if D3D12MA_MAKE_MINGW_VERSION(__MINGW64_VERSION_MAJOR, __MINGW64_VERSION_MINOR, \ |
| 16 | - __MINGW64_VERSION_BUGFIX) <= D3D12MA_MAKE_MINGW_VERSION(11, 0, 1) |
| 17 | - #if defined(__has_include) |
| 18 | - #if !__has_include(<dxguids.h>) |
| 19 | - #error "mingw or gcc detected. dxguids.h is needed. You can grab it from https://github.com/microsoft/DirectX-Headers or if you're on Ubuntu just run sudo apt install directx-headers-dev" |
| 20 | - #endif |
| 21 | - #endif |
| 22 | - #include <guiddef.h> |
| 23 | - // // guiddef.h must be included first. |
| 24 | - #include <dxguids.h> |
| 25 | - #endif |
| 26 | - #undef D3D12MA_MAKE_MINGW_VERSION |
| 27 | +// Includes needed for MinGW - see #71. |
| 28 | +#ifndef _MSC_VER |
| 29 | + #include <guiddef.h> |
| 30 | + // guiddef.h must be included first. |
| 31 | + #include <dxguids.h> |
| 32 | #endif |
| 33 | |
| 34 | //////////////////////////////////////////////////////////////////////////////// |