Skip to content

Commit

Permalink
physfs_platform_windows.c: Only compile with CreateFile2 support for …
Browse files Browse the repository at this point in the history
…WINRT

To avoid a commonly-hit issue due to toolchain defaults
  • Loading branch information
past-due authored and icculus committed Jan 18, 2024
1 parent 7931b9b commit cc2da5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/physfs_platform_windows.c
Expand Up @@ -123,7 +123,7 @@ static inline HANDLE winCreateFileW(const WCHAR *wfname, const DWORD mode,
const DWORD creation)
{
const DWORD share = FILE_SHARE_READ | FILE_SHARE_WRITE;
#if defined(PHYSFS_PLATFORM_WINRT) || (_WIN32_WINNT >= 0x0602) // Windows 8+
#if defined(PHYSFS_PLATFORM_WINRT) // also available if targeting Windows 8+ || (_WIN32_WINNT >= 0x0602) - but do not include this for now, due to common toolchain defaults
return CreateFile2(wfname, mode, share, creation, NULL);
#else
return CreateFileW(wfname, mode, share, NULL, creation,
Expand Down

0 comments on commit cc2da5a

Please sign in to comment.