Skip to content

Commit e909fa6

Browse files
authored
EncodeDDSHeader for Xbox can't take a nullptr (#613)
1 parent 57564ef commit e909fa6

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

Auxiliary/DirectXTexEXR.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,9 @@ HRESULT DirectX::SaveToEXRFile(const Image& image, const wchar_t* szFile)
490490
}
491491

492492
// Create file and write header
493-
ScopedHandle hFile(safe_handle(CreateFileW(
493+
ScopedHandle hFile(safe_handle(CreateFile2(
494494
szFile,
495-
GENERIC_WRITE, 0,
496-
nullptr,
497-
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL,
495+
GENERIC_WRITE, 0, CREATE_ALWAYS,
498496
nullptr)));
499497
if (!hFile)
500498
{

Auxiliary/DirectXTexXbox.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,6 @@ namespace Xbox
218218
{
219219
return EncodeDDSHeader(xbox, reinterpret_cast<uint8_t*>(pDestination), maxsize);
220220
}
221-
222-
inline HRESULT __cdecl EncodeDDSHeader(
223-
const XboxImage& xbox,
224-
_Reserved_ std::nullptr_t, _In_ size_t maxsize) noexcept
225-
{
226-
return EncodeDDSHeader(xbox, static_cast<uint8_t*>(nullptr), maxsize);
227-
}
228221
#endif
229222

230223
} // namespace

0 commit comments

Comments
 (0)