Update to support ABI for MinGW in DX Agility SDK v1.606.3 (#279)

This commit is contained in:
Chuck Walbourn
2022-07-25 14:48:46 -07:00
committed by GitHub
parent 679538ee83
commit 33e9632f50
3 changed files with 59 additions and 2 deletions

View File

@@ -898,7 +898,12 @@ HRESULT DirectX::SaveDDSTextureToFile(
pCommandQ->GetDevice(IID_ID3D12Device, reinterpret_cast<void**>(device.GetAddressOf()));
// Get the size of the image
const auto desc = pSource->GetDesc();
#if defined(_MSC_VER) || !defined(_WIN32)
auto const desc = pSource->GetDesc();
#else
D3D12_RESOURCE_DESC tmpDesc;
auto const& desc = *pSource->GetDesc(&tmpDesc);
#endif
if (desc.Width > UINT32_MAX)
return E_INVALIDARG;
@@ -1121,7 +1126,12 @@ HRESULT DirectX::SaveWICTextureToFile(
pCommandQ->GetDevice(IID_ID3D12Device, reinterpret_cast<void**>(device.GetAddressOf()));
// Get the size of the image
const auto desc = pSource->GetDesc();
#if defined(_MSC_VER) || !defined(_WIN32)
auto const desc = pSource->GetDesc();
#else
D3D12_RESOURCE_DESC tmpDesc;
auto const& desc = *pSource->GetDesc(&tmpDesc);
#endif
if (desc.Width > UINT32_MAX)
return E_INVALIDARG;