SDL_rwops.c (SDL_IsRegularFile): fix WinRT build failure due to S_ISREG

(cherry picked from commit fcd1c155cc)
This commit is contained in:
Ozkan Sezer committed 2024-01-28 02:21:01 +03:00
1 parent 3bf60755cb
commit fd08ca3823
1 file changed
+1 -1
+1 -1
View File
@@ -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