Explorar o código

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

Ozkan Sezer %!s(int64=2) %!d(string=hai) anos
pai
achega
fcd1c155cc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/file/SDL_rwops.c

+ 1 - 1
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