Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UWP builds #195

Merged
merged 2 commits into from
Jun 17, 2023
Merged

Fix UWP builds #195

merged 2 commits into from
Jun 17, 2023

Conversation

Osyotr
Copy link
Contributor

@Osyotr Osyotr commented Jun 17, 2023

UWP does not support memory mapped files.

Found while updating version in vcpkg: microsoft/vcpkg#32074

UWP does not support memory mapped files.
@syoyo
Copy link
Owner

syoyo commented Jun 17, 2023

Oh its interesting that UWP doesn't support mmap.

Considering other Windows build configuration(e.g. mingw), it'd be better to write something like:

#if !defined(UWP_BUILD) 
#define TINYEXR_USE_WIN32_MMAP (1)
#endif

to disable mmap only for UWP build.

What macro will be defined in UWP build?

@Osyotr
Copy link
Contributor Author

Osyotr commented Jun 17, 2023

I think WINAPI_FAMILY is the right define to check for UWP. I've updated the condition to only trigger when it's defined, without introducing new define in global scope.

@syoyo syoyo merged commit 13d2154 into syoyo:release Jun 17, 2023
@syoyo
Copy link
Owner

syoyo commented Jun 17, 2023

Thanks! Merged!

@Osyotr Osyotr deleted the patch-1 branch June 17, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants