From fd08ca38232967603a45dede8cd4b6d9e8b8925b Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sun, 28 Jan 2024 02:20:00 +0300 Subject: [PATCH] SDL_rwops.c (SDL_IsRegularFile): fix WinRT build failure due to S_ISREG (cherry picked from commit fcd1c155ccec7ac57b77cbc8571a321a5954c2cb) --- src/file/SDL_rwops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file/SDL_rwops.c b/src/file/SDL_rwops.c index d46089e7b..439f20a5e 100644 --- a/src/file/SDL_rwops.c +++ b/src/file/SDL_rwops.c @@ -529,7 +529,7 @@ static SDL_bool SDL_IsRegularFile(FILE *f) { #ifdef __WINRT__ struct __stat64 st; - if (_fstat64(_fileno(f), &st) < 0 || !S_ISREG(st.st_mode)) { + if (_fstat64(_fileno(f), &st) < 0 || (st.st_mode & _S_IFMT) != _S_IFREG) { return SDL_FALSE; } #else